diff options
Diffstat (limited to 'fs/nls/nls_cp737.c')
-rw-r--r-- | fs/nls/nls_cp737.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/nls/nls_cp737.c b/fs/nls/nls_cp737.c index d21f8790aa19..f5576b8be1b9 100644 --- a/fs/nls/nls_cp737.c +++ b/fs/nls/nls_cp737.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/nls.h> | 13 | #include <linux/nls.h> |
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | 15 | ||
16 | static wchar_t charset2uni[256] = { | 16 | static const wchar_t charset2uni[256] = { |
17 | /* 0x00*/ | 17 | /* 0x00*/ |
18 | 0x0000, 0x0001, 0x0002, 0x0003, | 18 | 0x0000, 0x0001, 0x0002, 0x0003, |
19 | 0x0004, 0x0005, 0x0006, 0x0007, | 19 | 0x0004, 0x0005, 0x0006, 0x0007, |
@@ -96,7 +96,7 @@ static wchar_t charset2uni[256] = { | |||
96 | 0x207f, 0x00b2, 0x25a0, 0x00a0, | 96 | 0x207f, 0x00b2, 0x25a0, 0x00a0, |
97 | }; | 97 | }; |
98 | 98 | ||
99 | static unsigned char page00[256] = { | 99 | static const unsigned char page00[256] = { |
100 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */ | 100 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */ |
101 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */ | 101 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */ |
102 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */ | 102 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */ |
@@ -131,7 +131,7 @@ static unsigned char page00[256] = { | |||
131 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, /* 0xf0-0xf7 */ | 131 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, /* 0xf0-0xf7 */ |
132 | }; | 132 | }; |
133 | 133 | ||
134 | static unsigned char page03[256] = { | 134 | static const unsigned char page03[256] = { |
135 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ | 135 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ |
136 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ | 136 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ |
137 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ | 137 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ |
@@ -161,7 +161,7 @@ static unsigned char page03[256] = { | |||
161 | 0xaf, 0xe0, 0xe4, 0xe8, 0xe6, 0xe7, 0xe9, 0x00, /* 0xc8-0xcf */ | 161 | 0xaf, 0xe0, 0xe4, 0xe8, 0xe6, 0xe7, 0xe9, 0x00, /* 0xc8-0xcf */ |
162 | }; | 162 | }; |
163 | 163 | ||
164 | static unsigned char page20[256] = { | 164 | static const unsigned char page20[256] = { |
165 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ | 165 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ |
166 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ | 166 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ |
167 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ | 167 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ |
@@ -180,7 +180,7 @@ static unsigned char page20[256] = { | |||
180 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, /* 0x78-0x7f */ | 180 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, /* 0x78-0x7f */ |
181 | }; | 181 | }; |
182 | 182 | ||
183 | static unsigned char page22[256] = { | 183 | static const unsigned char page22[256] = { |
184 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ | 184 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ |
185 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ | 185 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ |
186 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ | 186 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ |
@@ -196,7 +196,7 @@ static unsigned char page22[256] = { | |||
196 | 0x00, 0x00, 0x00, 0x00, 0xf3, 0xf2, 0x00, 0x00, /* 0x60-0x67 */ | 196 | 0x00, 0x00, 0x00, 0x00, 0xf3, 0xf2, 0x00, 0x00, /* 0x60-0x67 */ |
197 | }; | 197 | }; |
198 | 198 | ||
199 | static unsigned char page25[256] = { | 199 | static const unsigned char page25[256] = { |
200 | 0xc4, 0x00, 0xb3, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ | 200 | 0xc4, 0x00, 0xb3, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ |
201 | 0x00, 0x00, 0x00, 0x00, 0xda, 0x00, 0x00, 0x00, /* 0x08-0x0f */ | 201 | 0x00, 0x00, 0x00, 0x00, 0xda, 0x00, 0x00, 0x00, /* 0x08-0x0f */ |
202 | 0xbf, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, /* 0x10-0x17 */ | 202 | 0xbf, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, /* 0x10-0x17 */ |
@@ -221,7 +221,7 @@ static unsigned char page25[256] = { | |||
221 | 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */ | 221 | 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */ |
222 | }; | 222 | }; |
223 | 223 | ||
224 | static unsigned char *page_uni2charset[256] = { | 224 | static const unsigned char *const page_uni2charset[256] = { |
225 | page00, NULL, NULL, page03, NULL, NULL, NULL, NULL, | 225 | page00, NULL, NULL, page03, NULL, NULL, NULL, NULL, |
226 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | 226 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
227 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | 227 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
@@ -229,7 +229,7 @@ static unsigned char *page_uni2charset[256] = { | |||
229 | page20, NULL, page22, NULL, NULL, page25, NULL, NULL, | 229 | page20, NULL, page22, NULL, NULL, page25, NULL, NULL, |
230 | }; | 230 | }; |
231 | 231 | ||
232 | static unsigned char charset2lower[256] = { | 232 | static const unsigned char charset2lower[256] = { |
233 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */ | 233 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */ |
234 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */ | 234 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */ |
235 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */ | 235 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */ |
@@ -265,7 +265,7 @@ static unsigned char charset2lower[256] = { | |||
265 | 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0xf8-0xff */ | 265 | 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0xf8-0xff */ |
266 | }; | 266 | }; |
267 | 267 | ||
268 | static unsigned char charset2upper[256] = { | 268 | static const unsigned char charset2upper[256] = { |
269 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */ | 269 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */ |
270 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */ | 270 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */ |
271 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */ | 271 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */ |
@@ -303,7 +303,7 @@ static unsigned char charset2upper[256] = { | |||
303 | 303 | ||
304 | static int uni2char(wchar_t uni, unsigned char *out, int boundlen) | 304 | static int uni2char(wchar_t uni, unsigned char *out, int boundlen) |
305 | { | 305 | { |
306 | unsigned char *uni2charset; | 306 | const unsigned char *uni2charset; |
307 | unsigned char cl = uni & 0x00ff; | 307 | unsigned char cl = uni & 0x00ff; |
308 | unsigned char ch = (uni & 0xff00) >> 8; | 308 | unsigned char ch = (uni & 0xff00) >> 8; |
309 | 309 | ||