diff options
| author | Kenichi Handa | 2003-05-20 13:15:45 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2003-05-20 13:15:45 +0000 |
| commit | f106f9b09c0333bbea8bb3cb9064214509f95774 (patch) | |
| tree | 1332df02e4fcc27a5d1cf8fc59f5aae4a7ddee9e | |
| parent | 7da4427d5b16248195c0d9ead79a10412b79d430 (diff) | |
| download | emacs-f106f9b09c0333bbea8bb3cb9064214509f95774.tar.gz emacs-f106f9b09c0333bbea8bb3cb9064214509f95774.zip | |
*** empty log message ***
| -rw-r--r-- | etc/ChangeLog | 14 | ||||
| -rw-r--r-- | etc/charsets/README | 1 | ||||
| -rw-r--r-- | etc/charsets/gb18030.awk | 115 | ||||
| -rw-r--r-- | src/ChangeLog | 12 |
4 files changed, 26 insertions, 116 deletions
diff --git a/etc/ChangeLog b/etc/ChangeLog index dc21203e5f1..946a16b9501 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,5 +1,19 @@ | |||
| 1 | 2003-04-12 Kenichi Handa <handa@m17n.org> | 1 | 2003-04-12 Kenichi Handa <handa@m17n.org> |
| 2 | 2 | ||
| 3 | * charsets/Makefile (MAPS): Change gb18030.map to gb18030-2.map | ||
| 4 | and gb18030-4.map. | ||
| 5 | (gb18030.map): Delete this target. | ||
| 6 | (gb18030-2.map, gb18030-4.map): New targets. | ||
| 7 | |||
| 8 | * charsets/gb18030.awk: Deleted. | ||
| 9 | |||
| 10 | * charsets/gb18030-2.awk, charsets/gb18030-4.awk: Make them work | ||
| 11 | for the map file included int glibc. | ||
| 12 | |||
| 13 | * charsets/gb18030-2.map, charsets/gb18030-4.map: Remade by them. | ||
| 14 | |||
| 15 | 2003-04-12 Kenichi Handa <handa@m17n.org> | ||
| 16 | |||
| 3 | * HELLO: Change "Hindi" to more common characters. | 17 | * HELLO: Change "Hindi" to more common characters. |
| 4 | 18 | ||
| 5 | 2003-02-12 Dave Love <fx@gnu.org> | 19 | 2003-02-12 Dave Love <fx@gnu.org> |
diff --git a/etc/charsets/README b/etc/charsets/README index 2eedc65819d..2282abef8a6 100644 --- a/etc/charsets/README +++ b/etc/charsets/README | |||
| @@ -73,7 +73,6 @@ MACINTOSH mac-roman.map mac-roman | |||
| 73 | VISCII viscii.map viscii | 73 | VISCII viscii.map viscii |
| 74 | VISCII viscii-lower.map vietnamese-viscii-lower | 74 | VISCII viscii-lower.map vietnamese-viscii-lower |
| 75 | VISCII viscii-upper.map vietnamese-viscii-upper | 75 | VISCII viscii-upper.map vietnamese-viscii-upper |
| 76 | VISCII vscii.map vscii | ||
| 77 | KOI8-R koi8-r.map koi8-r | 76 | KOI8-R koi8-r.map koi8-r |
| 78 | IBM866 ibm866.map alternativnyj | 77 | IBM866 ibm866.map alternativnyj |
| 79 | CP1251 windows-1251.map windows-1251 | 78 | CP1251 windows-1251.map windows-1251 |
diff --git a/etc/charsets/gb18030.awk b/etc/charsets/gb18030.awk deleted file mode 100644 index b09571fca62..00000000000 --- a/etc/charsets/gb18030.awk +++ /dev/null | |||
| @@ -1,115 +0,0 @@ | |||
| 1 | BEGIN { | ||
| 2 | tohex["A"] = 10; | ||
| 3 | tohex["B"] = 11; | ||
| 4 | tohex["C"] = 12; | ||
| 5 | tohex["D"] = 13; | ||
| 6 | tohex["E"] = 14; | ||
| 7 | tohex["F"] = 15; | ||
| 8 | tohex["a"] = 10; | ||
| 9 | tohex["b"] = 11; | ||
| 10 | tohex["c"] = 12; | ||
| 11 | tohex["d"] = 13; | ||
| 12 | tohex["e"] = 14; | ||
| 13 | tohex["f"] = 15; | ||
| 14 | } | ||
| 15 | |||
| 16 | function decode_hex(str) { | ||
| 17 | n = 0; | ||
| 18 | len = length(str); | ||
| 19 | for (i = 1; i <= len; i++) | ||
| 20 | { | ||
| 21 | c = substr (str, i, 1); | ||
| 22 | if (c >= "0" && c <= "9") | ||
| 23 | n = n * 16 + (c - "0"); | ||
| 24 | else | ||
| 25 | n = n * 16 + tohex[c]; | ||
| 26 | } | ||
| 27 | return n; | ||
| 28 | } | ||
| 29 | |||
| 30 | function gb_to_index(b0,b1,b2,b3) { | ||
| 31 | return ((((b0 - 129) * 10 + (b1 - 48)) * 126 + (b2 - 129)) * 10 + b3 - 48); | ||
| 32 | } | ||
| 33 | |||
| 34 | function index_to_gb(idx) { | ||
| 35 | b3 = (idx % 10) + 48; | ||
| 36 | idx /= 10; | ||
| 37 | b2 = (idx % 126) + 129; | ||
| 38 | idx /= 126; | ||
| 39 | b1 = (idx % 10) + 48; | ||
| 40 | b0 = (idx / 10) + 129; | ||
| 41 | return sprintf("%02X%02X%02X%02X", b0, b1, b2, b3); | ||
| 42 | } | ||
| 43 | |||
| 44 | function decode_gb(str) { | ||
| 45 | b0 = decode_hex(substr(str, 3, 2)); | ||
| 46 | b1 = decode_hex(substr(str, 7, 2)); | ||
| 47 | b2 = decode_hex(substr(str, 11, 2)); | ||
| 48 | b3 = decode_hex(substr(str, 15, 2)); | ||
| 49 | return gb_to_index(b0, b1, b2, b3); | ||
| 50 | } | ||
| 51 | |||
| 52 | function printline(from, to) { | ||
| 53 | fromgb = index_to_gb(from); | ||
| 54 | fromuni = gbtable[from]; | ||
| 55 | if (from == to) | ||
| 56 | printf ("0x%s U+%04X\n", fromgb, fromuni); | ||
| 57 | else | ||
| 58 | printf ("0x%s-0x%s U+%04X-U+%04X\n", fromgb, index_to_gb(to), | ||
| 59 | fromuni, fromuni + (to - from)); | ||
| 60 | } | ||
| 61 | |||
| 62 | /^<U[0-9A-F][0-9A-F][0-9A-F][0-9A-F]>/ { | ||
| 63 | unicode = decode_hex(substr($1, 3, 4)); | ||
| 64 | if ($2 ~ /\\x8[1-4]\\x3[0-9]\\x[8-9A-F][0-9A-F]\\x3[0-9]/) | ||
| 65 | unitable[unicode] = decode_gb($2); | ||
| 66 | else | ||
| 67 | unitable[unicode] = -1; | ||
| 68 | } | ||
| 69 | |||
| 70 | END { | ||
| 71 | lastgb = 0; | ||
| 72 | surrogate_min = decode_hex("D800"); | ||
| 73 | surrogate_max = decode_hex("DFFF"); | ||
| 74 | lastgb = unitable[128]; | ||
| 75 | gbtable[lastgb] = 128; | ||
| 76 | for (i = 129; i < 65536; i++) | ||
| 77 | { | ||
| 78 | if (unitable[i] == 0 && (i < surrogate_min || i > surrogate_max)) | ||
| 79 | { | ||
| 80 | lastgb++; | ||
| 81 | gbtable[lastgb] = i; | ||
| 82 | unitable[i] = lastgb; | ||
| 83 | } | ||
| 84 | else if (unitable[i] > 0) | ||
| 85 | { | ||
| 86 | lastgb = unitable[i]; | ||
| 87 | gbtable[lastgb] = i; | ||
| 88 | } | ||
| 89 | } | ||
| 90 | |||
| 91 | fromgb = lastgb = unitable[128]; | ||
| 92 | for (i = 129; i < 65536; i++) | ||
| 93 | { | ||
| 94 | if (unitable[i] > 0) | ||
| 95 | { | ||
| 96 | if (lastgb + 1 == unitable[i]) | ||
| 97 | { | ||
| 98 | lastgb++; | ||
| 99 | } | ||
| 100 | else | ||
| 101 | { | ||
| 102 | if (lastgb >= 0) | ||
| 103 | printline(fromgb, lastgb); | ||
| 104 | fromgb = lastgb = unitable[i]; | ||
| 105 | } | ||
| 106 | } | ||
| 107 | else # i.e. (unitable[i] < 0) | ||
| 108 | { | ||
| 109 | if (lastgb >= 0) | ||
| 110 | printline(fromgb, lastgb); | ||
| 111 | lastgb = -1; | ||
| 112 | } | ||
| 113 | } | ||
| 114 | printline(fromgb, unitable[65535]); | ||
| 115 | } | ||
diff --git a/src/ChangeLog b/src/ChangeLog index a7841cbc8cc..faa14e95895 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2003-05-20 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * fontset.c (BASE_FONTSET_P): Check FONTSET_BASE, not | ||
| 4 | FONTSET_NAME. | ||
| 5 | (fontset_add): Fix for the case that TO is less than TO1. | ||
| 6 | (Ffontset_info): Don't use fallback fontset on checking the | ||
| 7 | default fontset. | ||
| 8 | (dump_fontset): New function for debugging. | ||
| 9 | |||
| 10 | * coding.c (Fdefine_coding_system_internal): Fix for the case that | ||
| 11 | coding_type is Qcharset. | ||
| 12 | |||
| 1 | 2003-05-07 Kenichi Handa <handa@m17n.org> | 13 | 2003-05-07 Kenichi Handa <handa@m17n.org> |
| 2 | 14 | ||
| 3 | * chartab.c (map_sub_char_table): New argument DEFAULT_VAL. | 15 | * chartab.c (map_sub_char_table): New argument DEFAULT_VAL. |