changeset 88466:ddb17e4c813c

(END): Initialize lastgb and gbtable[lastgb] correctly.
author Kenichi Handa <handa@m17n.org>
date Wed, 08 May 2002 23:32:27 +0000
parents ae455bb40718
children 94f27a7cf6a9
files etc/charsets/gb18030.awk
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/etc/charsets/gb18030.awk	Wed May 08 04:19:41 2002 +0000
+++ b/etc/charsets/gb18030.awk	Wed May 08 23:32:27 2002 +0000
@@ -69,8 +69,10 @@
 
 END {
   lastgb = 0;
-  surrogate_min = decode_hex("D800")
-  surrogate_max = decode_hex("DFFF")
+  surrogate_min = decode_hex("D800");
+  surrogate_max = decode_hex("DFFF");
+  lastgb = unitable[128];
+  gbtable[lastgb] = 128;
   for (i = 129; i < 65536; i++)
     {
       if (unitable[i] == 0 && (i < surrogate_min || i > surrogate_max))
@@ -86,7 +88,6 @@
 	}
     }
 
-  print "You blew it again!" > "/dev/stderr"
   fromgb = lastgb = unitable[128];
   for (i = 129; i < 65536; i++)
     {