diff options
| author | Kenichi Handa | 2002-05-08 23:32:27 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2002-05-08 23:32:27 +0000 |
| commit | a2f1df024bc43e9c7a448c91c08304faa963c1f3 (patch) | |
| tree | 99a40aed1296733bdcbf093ac399b1c183e4eab0 | |
| parent | 4eb6d3f1201a174f9c366a0826fdf740f3ca4f9f (diff) | |
| download | emacs-a2f1df024bc43e9c7a448c91c08304faa963c1f3.tar.gz emacs-a2f1df024bc43e9c7a448c91c08304faa963c1f3.zip | |
(END): Initialize lastgb and gbtable[lastgb] correctly.
| -rw-r--r-- | etc/charsets/gb18030.awk | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/charsets/gb18030.awk b/etc/charsets/gb18030.awk index df56a8b2ca1..b09571fca62 100644 --- a/etc/charsets/gb18030.awk +++ b/etc/charsets/gb18030.awk | |||
| @@ -69,8 +69,10 @@ function printline(from, to) { | |||
| 69 | 69 | ||
| 70 | END { | 70 | END { |
| 71 | lastgb = 0; | 71 | lastgb = 0; |
| 72 | surrogate_min = decode_hex("D800") | 72 | surrogate_min = decode_hex("D800"); |
| 73 | surrogate_max = decode_hex("DFFF") | 73 | surrogate_max = decode_hex("DFFF"); |
| 74 | lastgb = unitable[128]; | ||
| 75 | gbtable[lastgb] = 128; | ||
| 74 | for (i = 129; i < 65536; i++) | 76 | for (i = 129; i < 65536; i++) |
| 75 | { | 77 | { |
| 76 | if (unitable[i] == 0 && (i < surrogate_min || i > surrogate_max)) | 78 | if (unitable[i] == 0 && (i < surrogate_min || i > surrogate_max)) |
| @@ -86,7 +88,6 @@ END { | |||
| 86 | } | 88 | } |
| 87 | } | 89 | } |
| 88 | 90 | ||
| 89 | print "You blew it again!" > "/dev/stderr" | ||
| 90 | fromgb = lastgb = unitable[128]; | 91 | fromgb = lastgb = unitable[128]; |
| 91 | for (i = 129; i < 65536; i++) | 92 | for (i = 129; i < 65536; i++) |
| 92 | { | 93 | { |