diff options
Diffstat (limited to 'fs/nls/nls_cp860.c')
| -rw-r--r-- | fs/nls/nls_cp860.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/nls/nls_cp860.c b/fs/nls/nls_cp860.c index 7e2fb664589..a86c97d1aa3 100644 --- a/fs/nls/nls_cp860.c +++ b/fs/nls/nls_cp860.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 | 0x00, 0x97, 0xa3, 0x00, 0x81, 0x00, 0x00, 0x00, /* 0xf8-0xff */ | 132 | 0x00, 0x97, 0xa3, 0x00, 0x81, 0x00, 0x00, 0x00, /* 0xf8-0xff */ |
| 133 | }; | 133 | }; |
| 134 | 134 | ||
| 135 | static unsigned char page03[256] = { | 135 | static const unsigned char page03[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 */ |
| @@ -161,7 +161,7 @@ static unsigned char page03[256] = { | |||
| 161 | 0xe3, 0x00, 0x00, 0xe5, 0xe7, 0x00, 0xed, 0x00, /* 0xc0-0xc7 */ | 161 | 0xe3, 0x00, 0x00, 0xe5, 0xe7, 0x00, 0xed, 0x00, /* 0xc0-0xc7 */ |
| 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 */ |
| @@ -186,7 +186,7 @@ static unsigned char page20[256] = { | |||
| 186 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, /* 0xa0-0xa7 */ | 186 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, /* 0xa0-0xa7 */ |
| 187 | }; | 187 | }; |
| 188 | 188 | ||
| 189 | static unsigned char page22[256] = { | 189 | static const unsigned char page22[256] = { |
| 190 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ | 190 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ |
| 191 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ | 191 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ |
| 192 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ | 192 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ |
| @@ -202,7 +202,7 @@ static unsigned char page22[256] = { | |||
| 202 | 0x00, 0xf0, 0x00, 0x00, 0xf3, 0xf2, 0x00, 0x00, /* 0x60-0x67 */ | 202 | 0x00, 0xf0, 0x00, 0x00, 0xf3, 0xf2, 0x00, 0x00, /* 0x60-0x67 */ |
| 203 | }; | 203 | }; |
| 204 | 204 | ||
| 205 | static unsigned char page23[256] = { | 205 | static const unsigned char page23[256] = { |
| 206 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ | 206 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ |
| 207 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ | 207 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ |
| 208 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ | 208 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ |
| @@ -210,7 +210,7 @@ static unsigned char page23[256] = { | |||
| 210 | 0xf4, 0xf5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */ | 210 | 0xf4, 0xf5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */ |
| 211 | }; | 211 | }; |
| 212 | 212 | ||
| 213 | static unsigned char page25[256] = { | 213 | static const unsigned char page25[256] = { |
| 214 | 0xc4, 0x00, 0xb3, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ | 214 | 0xc4, 0x00, 0xb3, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ |
| 215 | 0x00, 0x00, 0x00, 0x00, 0xda, 0x00, 0x00, 0x00, /* 0x08-0x0f */ | 215 | 0x00, 0x00, 0x00, 0x00, 0xda, 0x00, 0x00, 0x00, /* 0x08-0x0f */ |
| 216 | 0xbf, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, /* 0x10-0x17 */ | 216 | 0xbf, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, /* 0x10-0x17 */ |
| @@ -235,7 +235,7 @@ static unsigned char page25[256] = { | |||
| 235 | 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */ | 235 | 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */ |
| 236 | }; | 236 | }; |
| 237 | 237 | ||
| 238 | static unsigned char *page_uni2charset[256] = { | 238 | static const unsigned char *const page_uni2charset[256] = { |
| 239 | page00, NULL, NULL, page03, NULL, NULL, NULL, NULL, | 239 | page00, NULL, NULL, page03, NULL, NULL, NULL, NULL, |
| 240 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | 240 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
| 241 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | 241 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
| @@ -243,7 +243,7 @@ static unsigned char *page_uni2charset[256] = { | |||
| 243 | page20, NULL, page22, page23, NULL, page25, NULL, NULL, | 243 | page20, NULL, page22, page23, NULL, page25, NULL, NULL, |
| 244 | }; | 244 | }; |
| 245 | 245 | ||
| 246 | static unsigned char charset2lower[256] = { | 246 | static const unsigned char charset2lower[256] = { |
| 247 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */ | 247 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */ |
| 248 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */ | 248 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */ |
| 249 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */ | 249 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */ |
| @@ -279,7 +279,7 @@ static unsigned char charset2lower[256] = { | |||
| 279 | 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0xf8-0xff */ | 279 | 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0xf8-0xff */ |
| 280 | }; | 280 | }; |
| 281 | 281 | ||
| 282 | static unsigned char charset2upper[256] = { | 282 | static const unsigned char charset2upper[256] = { |
| 283 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */ | 283 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */ |
| 284 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */ | 284 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */ |
| 285 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */ | 285 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */ |
| @@ -317,7 +317,7 @@ static unsigned char charset2upper[256] = { | |||
| 317 | 317 | ||
| 318 | static int uni2char(wchar_t uni, unsigned char *out, int boundlen) | 318 | static int uni2char(wchar_t uni, unsigned char *out, int boundlen) |
| 319 | { | 319 | { |
| 320 | unsigned char *uni2charset; | 320 | const unsigned char *uni2charset; |
| 321 | unsigned char cl = uni & 0x00ff; | 321 | unsigned char cl = uni & 0x00ff; |
| 322 | unsigned char ch = (uni & 0xff00) >> 8; | 322 | unsigned char ch = (uni & 0xff00) >> 8; |
| 323 | 323 | ||
