diff options
Diffstat (limited to 'fs/nls/nls_cp865.c')
-rw-r--r-- | fs/nls/nls_cp865.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/fs/nls/nls_cp865.c b/fs/nls/nls_cp865.c index 5ba6ee13e109..4bd902fe3ec9 100644 --- a/fs/nls/nls_cp865.c +++ b/fs/nls/nls_cp865.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 */ |
@@ -132,7 +132,7 @@ static unsigned char page00[256] = { | |||
132 | 0x9b, 0x97, 0xa3, 0x96, 0x81, 0x00, 0x00, 0x98, /* 0xf8-0xff */ | 132 | 0x9b, 0x97, 0xa3, 0x96, 0x81, 0x00, 0x00, 0x98, /* 0xf8-0xff */ |
133 | }; | 133 | }; |
134 | 134 | ||
135 | static unsigned char page01[256] = { | 135 | static const unsigned char page01[256] = { |
136 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ | 136 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ |
137 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ | 137 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ |
138 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ | 138 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ |
@@ -155,7 +155,7 @@ static unsigned char page01[256] = { | |||
155 | 0x00, 0x00, 0x9f, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */ | 155 | 0x00, 0x00, 0x9f, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */ |
156 | }; | 156 | }; |
157 | 157 | ||
158 | static unsigned char page03[256] = { | 158 | static const unsigned char page03[256] = { |
159 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ | 159 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ |
160 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ | 160 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ |
161 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ | 161 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ |
@@ -184,7 +184,7 @@ static unsigned char page03[256] = { | |||
184 | 0xe3, 0x00, 0x00, 0xe5, 0xe7, 0x00, 0xed, 0x00, /* 0xc0-0xc7 */ | 184 | 0xe3, 0x00, 0x00, 0xe5, 0xe7, 0x00, 0xed, 0x00, /* 0xc0-0xc7 */ |
185 | }; | 185 | }; |
186 | 186 | ||
187 | static unsigned char page20[256] = { | 187 | static const unsigned char page20[256] = { |
188 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ | 188 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ |
189 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ | 189 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ |
190 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ | 190 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ |
@@ -209,7 +209,7 @@ static unsigned char page20[256] = { | |||
209 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, /* 0xa0-0xa7 */ | 209 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, /* 0xa0-0xa7 */ |
210 | }; | 210 | }; |
211 | 211 | ||
212 | static unsigned char page22[256] = { | 212 | static const unsigned char page22[256] = { |
213 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ | 213 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ |
214 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ | 214 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ |
215 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ | 215 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ |
@@ -225,7 +225,7 @@ static unsigned char page22[256] = { | |||
225 | 0x00, 0xf0, 0x00, 0x00, 0xf3, 0xf2, 0x00, 0x00, /* 0x60-0x67 */ | 225 | 0x00, 0xf0, 0x00, 0x00, 0xf3, 0xf2, 0x00, 0x00, /* 0x60-0x67 */ |
226 | }; | 226 | }; |
227 | 227 | ||
228 | static unsigned char page23[256] = { | 228 | static const unsigned char page23[256] = { |
229 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ | 229 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ |
230 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ | 230 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ |
231 | 0xa9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ | 231 | 0xa9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ |
@@ -233,7 +233,7 @@ static unsigned char page23[256] = { | |||
233 | 0xf4, 0xf5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */ | 233 | 0xf4, 0xf5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */ |
234 | }; | 234 | }; |
235 | 235 | ||
236 | static unsigned char page25[256] = { | 236 | static const unsigned char page25[256] = { |
237 | 0xc4, 0x00, 0xb3, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ | 237 | 0xc4, 0x00, 0xb3, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ |
238 | 0x00, 0x00, 0x00, 0x00, 0xda, 0x00, 0x00, 0x00, /* 0x08-0x0f */ | 238 | 0x00, 0x00, 0x00, 0x00, 0xda, 0x00, 0x00, 0x00, /* 0x08-0x0f */ |
239 | 0xbf, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, /* 0x10-0x17 */ | 239 | 0xbf, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, /* 0x10-0x17 */ |
@@ -258,7 +258,7 @@ static unsigned char page25[256] = { | |||
258 | 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */ | 258 | 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */ |
259 | }; | 259 | }; |
260 | 260 | ||
261 | static unsigned char *page_uni2charset[256] = { | 261 | static const unsigned char *const page_uni2charset[256] = { |
262 | page00, page01, NULL, page03, NULL, NULL, NULL, NULL, | 262 | page00, page01, NULL, page03, NULL, NULL, NULL, NULL, |
263 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | 263 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
264 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | 264 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
@@ -266,7 +266,7 @@ static unsigned char *page_uni2charset[256] = { | |||
266 | page20, NULL, page22, page23, NULL, page25, NULL, NULL, | 266 | page20, NULL, page22, page23, NULL, page25, NULL, NULL, |
267 | }; | 267 | }; |
268 | 268 | ||
269 | static unsigned char charset2lower[256] = { | 269 | static const unsigned char charset2lower[256] = { |
270 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */ | 270 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */ |
271 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */ | 271 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */ |
272 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */ | 272 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */ |
@@ -302,7 +302,7 @@ static unsigned char charset2lower[256] = { | |||
302 | 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0xf8-0xff */ | 302 | 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0xf8-0xff */ |
303 | }; | 303 | }; |
304 | 304 | ||
305 | static unsigned char charset2upper[256] = { | 305 | static const unsigned char charset2upper[256] = { |
306 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */ | 306 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */ |
307 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */ | 307 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */ |
308 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */ | 308 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */ |
@@ -340,7 +340,7 @@ static unsigned char charset2upper[256] = { | |||
340 | 340 | ||
341 | static int uni2char(wchar_t uni, unsigned char *out, int boundlen) | 341 | static int uni2char(wchar_t uni, unsigned char *out, int boundlen) |
342 | { | 342 | { |
343 | unsigned char *uni2charset; | 343 | const unsigned char *uni2charset; |
344 | unsigned char cl = uni & 0x00ff; | 344 | unsigned char cl = uni & 0x00ff; |
345 | unsigned char ch = (uni & 0xff00) >> 8; | 345 | unsigned char ch = (uni & 0xff00) >> 8; |
346 | 346 | ||