diff options
Diffstat (limited to 'fs/nls/nls_cp1250.c')
-rw-r--r-- | fs/nls/nls_cp1250.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/nls/nls_cp1250.c b/fs/nls/nls_cp1250.c index 570aa69846a0..c8471fe78e4e 100644 --- a/fs/nls/nls_cp1250.c +++ b/fs/nls/nls_cp1250.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 | 0x00fc, 0x00fd, 0x0163, 0x02d9, | 96 | 0x00fc, 0x00fd, 0x0163, 0x02d9, |
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, 0x00, 0xfa, 0x00, 0xfc, 0xfd, 0x00, 0x00, /* 0xf8-0xff */ | 132 | 0x00, 0x00, 0xfa, 0x00, 0xfc, 0xfd, 0x00, 0x00, /* 0xf8-0xff */ |
133 | }; | 133 | }; |
134 | 134 | ||
135 | static unsigned char page01[256] = { | 135 | static const unsigned char page01[256] = { |
136 | 0x00, 0x00, 0xc3, 0xe3, 0xa5, 0xb9, 0xc6, 0xe6, /* 0x00-0x07 */ | 136 | 0x00, 0x00, 0xc3, 0xe3, 0xa5, 0xb9, 0xc6, 0xe6, /* 0x00-0x07 */ |
137 | 0x00, 0x00, 0x00, 0x00, 0xc8, 0xe8, 0xcf, 0xef, /* 0x08-0x0f */ | 137 | 0x00, 0x00, 0x00, 0x00, 0xc8, 0xe8, 0xcf, 0xef, /* 0x08-0x0f */ |
138 | 0xd0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ | 138 | 0xd0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ |
@@ -152,7 +152,7 @@ static unsigned char page01[256] = { | |||
152 | 152 | ||
153 | }; | 153 | }; |
154 | 154 | ||
155 | static unsigned char page02[256] = { | 155 | static const unsigned char page02[256] = { |
156 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ | 156 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ |
157 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ | 157 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ |
158 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ | 158 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ |
@@ -184,7 +184,7 @@ static unsigned char page02[256] = { | |||
184 | 0xa2, 0xff, 0x00, 0xb2, 0x00, 0xbd, 0x00, 0x00, /* 0xd8-0xdf */ | 184 | 0xa2, 0xff, 0x00, 0xb2, 0x00, 0xbd, 0x00, 0x00, /* 0xd8-0xdf */ |
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, 0x96, 0x97, 0x00, 0x00, 0x00, /* 0x10-0x17 */ | 190 | 0x00, 0x00, 0x00, 0x96, 0x97, 0x00, 0x00, 0x00, /* 0x10-0x17 */ |
@@ -210,7 +210,7 @@ static unsigned char page20[256] = { | |||
210 | 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, /* 0xa8-0xaf */ | 210 | 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, /* 0xa8-0xaf */ |
211 | }; | 211 | }; |
212 | 212 | ||
213 | static unsigned char page21[256] = { | 213 | static const unsigned char page21[256] = { |
214 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ | 214 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ |
215 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ | 215 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ |
216 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ | 216 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ |
@@ -218,7 +218,7 @@ static unsigned char page21[256] = { | |||
218 | 0x00, 0x00, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */ | 218 | 0x00, 0x00, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */ |
219 | }; | 219 | }; |
220 | 220 | ||
221 | static unsigned char *page_uni2charset[256] = { | 221 | static const unsigned char *const page_uni2charset[256] = { |
222 | page00, page01, page02, NULL, NULL, NULL, NULL, NULL, | 222 | page00, page01, page02, NULL, NULL, NULL, NULL, NULL, |
223 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | 223 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
224 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | 224 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
@@ -226,7 +226,7 @@ static unsigned char *page_uni2charset[256] = { | |||
226 | page20, page21, NULL, NULL, NULL, NULL, NULL, NULL, | 226 | page20, page21, NULL, NULL, NULL, NULL, NULL, NULL, |
227 | }; | 227 | }; |
228 | 228 | ||
229 | static unsigned char charset2lower[256] = { | 229 | static const unsigned char charset2lower[256] = { |
230 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */ | 230 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */ |
231 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */ | 231 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */ |
232 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */ | 232 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */ |
@@ -262,7 +262,7 @@ static unsigned char charset2lower[256] = { | |||
262 | 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0xf8-0xff */ | 262 | 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0xf8-0xff */ |
263 | }; | 263 | }; |
264 | 264 | ||
265 | static unsigned char charset2upper[256] = { | 265 | static const unsigned char charset2upper[256] = { |
266 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */ | 266 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */ |
267 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */ | 267 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */ |
268 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */ | 268 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */ |
@@ -300,7 +300,7 @@ static unsigned char charset2upper[256] = { | |||
300 | 300 | ||
301 | static int uni2char(wchar_t uni, unsigned char *out, int boundlen) | 301 | static int uni2char(wchar_t uni, unsigned char *out, int boundlen) |
302 | { | 302 | { |
303 | unsigned char *uni2charset; | 303 | const unsigned char *uni2charset; |
304 | unsigned char cl = uni & 0x00ff; | 304 | unsigned char cl = uni & 0x00ff; |
305 | unsigned char ch = (uni & 0xff00) >> 8; | 305 | unsigned char ch = (uni & 0xff00) >> 8; |
306 | 306 | ||