aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nls
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2006-04-02 00:08:05 -0500
committerDmitry Torokhov <dtor_core@ameritech.net>2006-04-02 00:08:05 -0500
commit95d465fd750897ab32462a6702fbfe1b122cbbc0 (patch)
tree65c38b2f11c51bb6932e44dd6c92f15b0091abfe /fs/nls
parent642fde17dceceb56c7ba2762733ac688666ae657 (diff)
parent683aa4012f53b2ada0f430487e05d37b0d94e90a (diff)
Manual merge with Linus.
Conflicts: arch/powerpc/kernel/setup-common.c drivers/input/keyboard/hil_kbd.c drivers/input/mouse/hil_ptr.c
Diffstat (limited to 'fs/nls')
-rw-r--r--fs/nls/Kconfig2
-rw-r--r--fs/nls/nls_euc-jp.c6
2 files changed, 3 insertions, 5 deletions
diff --git a/fs/nls/Kconfig b/fs/nls/Kconfig
index 0ab8f00bdbb2..976ecccd6f56 100644
--- a/fs/nls/Kconfig
+++ b/fs/nls/Kconfig
@@ -491,7 +491,7 @@ config NLS_KOI8_U
491 (koi8-u) and Belarusian (koi8-ru) character sets. 491 (koi8-u) and Belarusian (koi8-ru) character sets.
492 492
493config NLS_UTF8 493config NLS_UTF8
494 tristate "NLS UTF8" 494 tristate "NLS UTF-8"
495 depends on NLS 495 depends on NLS
496 help 496 help
497 If you want to display filenames with native language characters 497 If you want to display filenames with native language characters
diff --git a/fs/nls/nls_euc-jp.c b/fs/nls/nls_euc-jp.c
index 80f108ae6661..06640c3e4021 100644
--- a/fs/nls/nls_euc-jp.c
+++ b/fs/nls/nls_euc-jp.c
@@ -268,8 +268,6 @@ static unsigned char euc2sjisibm_g3upper_map[][2] = {
268 {0xFC, 0x4B}, 268 {0xFC, 0x4B},
269}; 269};
270 270
271#define MAP_ELEMENT_OF(map) (sizeof(map) / sizeof(map[0]))
272
273static inline int sjisibm2euc(unsigned char *euc, const unsigned char sjis_hi, 271static inline int sjisibm2euc(unsigned char *euc, const unsigned char sjis_hi,
274 const unsigned char sjis_lo); 272 const unsigned char sjis_lo);
275static inline int euc2sjisibm_jisx0212(unsigned char *sjis, const unsigned char euc_hi, 273static inline int euc2sjisibm_jisx0212(unsigned char *sjis, const unsigned char euc_hi,
@@ -310,7 +308,7 @@ static inline int euc2sjisibm_jisx0212(unsigned char *sjis, const unsigned char
310 unsigned short euc; 308 unsigned short euc;
311 309
312 min_index = 0; 310 min_index = 0;
313 max_index = MAP_ELEMENT_OF(euc2sjisibm_jisx0212_map) - 1; 311 max_index = ARRAY_SIZE(euc2sjisibm_jisx0212_map) - 1;
314 euc = (euc_hi << 8) | euc_lo; 312 euc = (euc_hi << 8) | euc_lo;
315 313
316 while (min_index <= max_index) { 314 while (min_index <= max_index) {
@@ -339,7 +337,7 @@ static inline int euc2sjisibm_g3upper(unsigned char *sjis, const unsigned char e
339 else 337 else
340 index = ((euc_hi << 8) | euc_lo) - 0xF4A1 + 12; 338 index = ((euc_hi << 8) | euc_lo) - 0xF4A1 + 12;
341 339
342 if ((index < 0) || (index >= MAP_ELEMENT_OF(euc2sjisibm_g3upper_map))) 340 if ((index < 0) || (index >= ARRAY_SIZE(euc2sjisibm_g3upper_map)))
343 return 0; 341 return 0;
344 342
345 sjis[0] = euc2sjisibm_g3upper_map[index][0]; 343 sjis[0] = euc2sjisibm_g3upper_map[index][0];