aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nls/nls_iso8859-15.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2007-10-17 02:29:54 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 11:42:58 -0400
commitb9ec0339d8e22cadf2d9d1b010b51dc53837dfb0 (patch)
treee7d05e78a68eecc00e656e7e4fdf518967826381 /fs/nls/nls_iso8859-15.c
parent37c42524d6090644206ae6d310d7e830bd3ccb47 (diff)
add consts where appropriate in fs/nls/*
Add const modifiers to a few struct nls_table's member pointers in include/linux/nls.h and adds a lot of const's in fs/nls/*.c files. Resulting changes as visible by size: text data bss dec hex filename 113612 481216 2368 597196 91ccc nls.org/built-in.o 593548 3296 288 597132 91c8c nls/built-in.o Apparently compiler managed to optimize code a bit better because of const-ness. No other changes are made. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nls/nls_iso8859-15.c')
-rw-r--r--fs/nls/nls_iso8859-15.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/nls/nls_iso8859-15.c b/fs/nls/nls_iso8859-15.c
index 5c91592779fe..3c7dfc832ef1 100644
--- a/fs/nls/nls_iso8859-15.c
+++ b/fs/nls/nls_iso8859-15.c
@@ -11,7 +11,7 @@
11#include <linux/nls.h> 11#include <linux/nls.h>
12#include <linux/errno.h> 12#include <linux/errno.h>
13 13
14static wchar_t charset2uni[256] = { 14static const wchar_t charset2uni[256] = {
15 /* 0x00*/ 15 /* 0x00*/
16 0x0000, 0x0001, 0x0002, 0x0003, 16 0x0000, 0x0001, 0x0002, 0x0003,
17 0x0004, 0x0005, 0x0006, 0x0007, 17 0x0004, 0x0005, 0x0006, 0x0007,
@@ -94,7 +94,7 @@ static wchar_t charset2uni[256] = {
94 0x00fc, 0x00fd, 0x00fe, 0x00ff, 94 0x00fc, 0x00fd, 0x00fe, 0x00ff,
95}; 95};
96 96
97static unsigned char page00[256] = { 97static const unsigned char page00[256] = {
98 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */ 98 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */
99 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */ 99 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */
100 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */ 100 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */
@@ -130,7 +130,7 @@ static unsigned char page00[256] = {
130 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0xf8-0xff */ 130 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0xf8-0xff */
131}; 131};
132 132
133static unsigned char page01[256] = { 133static const unsigned char page01[256] = {
134 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ 134 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
135 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ 135 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
136 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ 136 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
@@ -149,7 +149,7 @@ static unsigned char page01[256] = {
149 0xbe, 0x00, 0x00, 0x00, 0x00, 0xb4, 0xb8, 0x00, /* 0x78-0x7f */ 149 0xbe, 0x00, 0x00, 0x00, 0x00, 0xb4, 0xb8, 0x00, /* 0x78-0x7f */
150}; 150};
151 151
152static unsigned char page20[256] = { 152static const unsigned char page20[256] = {
153 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ 153 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
154 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ 154 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
155 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ 155 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
@@ -175,7 +175,7 @@ static unsigned char page20[256] = {
175 0x00, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x00, 0x00, /* 0xa8-0xaf */ 175 0x00, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
176}; 176};
177 177
178static unsigned char *page_uni2charset[256] = { 178static const unsigned char *const page_uni2charset[256] = {
179 page00, page01, NULL, NULL, NULL, NULL, NULL, NULL, 179 page00, page01, NULL, NULL, NULL, NULL, NULL, NULL,
180 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 180 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
181 181
@@ -186,7 +186,7 @@ static unsigned char *page_uni2charset[256] = {
186 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 186 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
187}; 187};
188 188
189static unsigned char charset2lower[256] = { 189static const unsigned char charset2lower[256] = {
190 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */ 190 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */
191 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */ 191 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */
192 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */ 192 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */
@@ -222,7 +222,7 @@ static unsigned char charset2lower[256] = {
222 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0xf8-0xff */ 222 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0xf8-0xff */
223}; 223};
224 224
225static unsigned char charset2upper[256] = { 225static const unsigned char charset2upper[256] = {
226 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */ 226 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */
227 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */ 227 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */
228 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */ 228 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */
@@ -260,7 +260,7 @@ static unsigned char charset2upper[256] = {
260 260
261static int uni2char(wchar_t uni, unsigned char *out, int boundlen) 261static int uni2char(wchar_t uni, unsigned char *out, int boundlen)
262{ 262{
263 unsigned char *uni2charset; 263 const unsigned char *uni2charset;
264 unsigned char cl = uni & 0x00ff; 264 unsigned char cl = uni & 0x00ff;
265 unsigned char ch = (uni & 0xff00) >> 8; 265 unsigned char ch = (uni & 0xff00) >> 8;
266 266