changeset 89313:1991025c6bc2

(Fdefine_charset_internal): Setup charset.fast_map correctly.
author Kenichi Handa <handa@m17n.org>
date Thu, 05 Dec 2002 04:25:02 +0000
parents b16dfc7810f8
children f040012c16bb
files src/charset.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/charset.c	Thu Dec 05 04:24:45 2002 +0000
+++ b/src/charset.c	Thu Dec 05 04:25:02 2002 +0000
@@ -900,9 +900,10 @@
       if (charset.max_char > MAX_CHAR)
 	error ("Unsupported max char: %d", charset.max_char);
 
-      for (i = charset.min_char; i < 0x10000 && i <= charset.max_char;
-	   i += 128)
+      i = (charset.min_char >> 7) << 7;
+      for (; i < 0x10000 && i <= charset.max_char; i += 128)
 	CHARSET_FAST_MAP_SET (i, charset.fast_map);
+      i = (i >> 12) << 12;
       for (; i <= charset.max_char; i += 0x1000)
 	CHARSET_FAST_MAP_SET (i, charset.fast_map);
     }