Change charset-id of ISO-IR sets from ISO-IR-number n to -n;
authortomo <tomo>
Thu, 3 Apr 2003 16:32:03 +0000 (16:32 +0000)
committertomo <tomo>
Thu, 3 Apr 2003 16:32:03 +0000 (16:32 +0000)
charset-id of non ISO-IR sets are changed to positive numbers.

src/char-ucs.h

index b6238da..0bad540 100644 (file)
@@ -61,99 +61,97 @@ Lisp_Object remove_char_ccs (Lisp_Object character, Lisp_Object ccs);
 
 typedef short Charset_ID;
 
-#define MIN_LEADING_BYTE               -0x200
-
 /* ISO/IEC 10646 */
-#define LEADING_BYTE_UCS               (MIN_LEADING_BYTE + 1)
+#define LEADING_BYTE_UCS               1
 
 /* represent normal 80-9F */
-#define LEADING_BYTE_CONTROL_1         (MIN_LEADING_BYTE + 2)
+#define LEADING_BYTE_CONTROL_1         2
 
 /* ISO/IEC 10646 BMP */
-#define LEADING_BYTE_UCS_BMP           (MIN_LEADING_BYTE + 3)
+#define LEADING_BYTE_UCS_BMP           3
 
 /* ISO/IEC 10646 SMP */
-#define LEADING_BYTE_UCS_SMP           (MIN_LEADING_BYTE + 4)
+#define LEADING_BYTE_UCS_SMP           4
 
 /* ISO/IEC 10646 SIP */
-#define LEADING_BYTE_UCS_SIP           (MIN_LEADING_BYTE + 5)
+#define LEADING_BYTE_UCS_SIP           5
 
 /* Japanese JIS X0208 Common   2/4 2/{(8),9,10,11} 4/2 (B) */
-#define LEADING_BYTE_JIS_X0208                 (MIN_LEADING_BYTE + 11)
+#define LEADING_BYTE_JIS_X0208                 11
 
 /* Japanese JIS X0208-1990     2/4 2/{(8),9,10,11} 4/2 (B) */
-#define LEADING_BYTE_JAPANESE_JISX0208_1990 (MIN_LEADING_BYTE + 12)
+#define LEADING_BYTE_JAPANESE_JISX0208_1990 12
 
 /* Chinese GB 12345-1990 */
-#define LEADING_BYTE_CHINESE_GB12345   (MIN_LEADING_BYTE + 13)
+#define LEADING_BYTE_CHINESE_GB12345   13
 
-#define LEADING_BYTE_CHINESE_BIG5      (MIN_LEADING_BYTE + 20)
+#define LEADING_BYTE_CHINESE_BIG5      20
 
 /* Big5 Level 1                        2/4 2/{(8),9,10,11} 4/0 '0' */
-#define LEADING_BYTE_CHINESE_BIG5_1    (MIN_LEADING_BYTE + 21)
+#define LEADING_BYTE_CHINESE_BIG5_1    21
 
 /* Big5 Level 2                        2/4 2/{(8),9,10,11} 4/0 '1' */
-#define LEADING_BYTE_CHINESE_BIG5_2    (MIN_LEADING_BYTE + 22)
+#define LEADING_BYTE_CHINESE_BIG5_2    22
 
 /* VISCII 1.1 */
-#define LEADING_BYTE_LATIN_VISCII      (MIN_LEADING_BYTE + 24)
+#define LEADING_BYTE_LATIN_VISCII      24
 
 /* MULE VISCII-LOWER                   (CHARSET_ID_OFFSET_96 + '1') */
-#define LEADING_BYTE_LATIN_VISCII_LOWER        (MIN_LEADING_BYTE + 25)
+#define LEADING_BYTE_LATIN_VISCII_LOWER        25
 
 /* MULE VISCII-UPPER                   (CHARSET_ID_OFFSET_96 + '2') */
-#define LEADING_BYTE_LATIN_VISCII_UPPER        (MIN_LEADING_BYTE + 26)
+#define LEADING_BYTE_LATIN_VISCII_UPPER        26
 
-#define LEADING_BYTE_ETHIOPIC_UCS      (MIN_LEADING_BYTE + 27)
+#define LEADING_BYTE_ETHIOPIC_UCS      27
 
-#define MIN_LEADING_BYTE_PRIVATE       (MIN_LEADING_BYTE + 97)
-#define MAX_LEADING_BYTE_PRIVATE       -1
+#define MIN_LEADING_BYTE_PRIVATE       28
+#define MAX_LEADING_BYTE_PRIVATE       512
 
 
 /* ISO 646 IRV */
-#define LEADING_BYTE_ASCII               6 /* (CHARSET_ID_OFFSET_94 + 'B') */
+#define LEADING_BYTE_ASCII               -6 /* (CHARSET_ID_OFFSET_94 + 'B') */
 
 /* Right half of JIS X0201-1976 */
-#define LEADING_BYTE_KATAKANA_JISX0201  13 /* (CHARSET_ID_OFFSET_94 + 'I') */
+#define LEADING_BYTE_KATAKANA_JISX0201  -13 /* (CHARSET_ID_OFFSET_94 + 'I') */
 
 /* Left  half of JIS X0201-1976 */
-#define LEADING_BYTE_LATIN_JISX0201     14 /* (CHARSET_ID_OFFSET_94 + 'J') */
+#define LEADING_BYTE_LATIN_JISX0201     -14 /* (CHARSET_ID_OFFSET_94 + 'J') */
 
 
 /* #define CHARSET_ID_OFFSET_96                (CHARSET_ID_OFFSET_94 + 80) */
 
 /* Right half of ISO 8859-1 */
-#define LEADING_BYTE_LATIN_ISO8859_1   100 /* (CHARSET_ID_OFFSET_96 + 'A') */
+#define LEADING_BYTE_LATIN_ISO8859_1   -100 /* (CHARSET_ID_OFFSET_96 + 'A') */
 
 /* Right half of ISO 8859-2 */
-#define LEADING_BYTE_LATIN_ISO8859_2   101 /* (CHARSET_ID_OFFSET_96 + 'B') */
+#define LEADING_BYTE_LATIN_ISO8859_2   -101 /* (CHARSET_ID_OFFSET_96 + 'B') */
 
 /* Right half of ISO 8859-3 */
-#define LEADING_BYTE_LATIN_ISO8859_3   109 /* (CHARSET_ID_OFFSET_96 + 'C') */
+#define LEADING_BYTE_LATIN_ISO8859_3   -109 /* (CHARSET_ID_OFFSET_96 + 'C') */
 
 /* Right half of ISO 8859-4 */
-#define LEADING_BYTE_LATIN_ISO8859_4   110 /* (CHARSET_ID_OFFSET_96 + 'D') */
+#define LEADING_BYTE_LATIN_ISO8859_4   -110 /* (CHARSET_ID_OFFSET_96 + 'D') */
 
 /* Right half of ISO 8859-7 */
-#define LEADING_BYTE_GREEK_ISO8859_7   126 /* (CHARSET_ID_OFFSET_96 + 'F') */
+#define LEADING_BYTE_GREEK_ISO8859_7   -126 /* (CHARSET_ID_OFFSET_96 + 'F') */
 
 /* Right half of ISO 8859-6 */
-#define LEADING_BYTE_ARABIC_ISO8859_6  127 /* (CHARSET_ID_OFFSET_96 + 'G') */
+#define LEADING_BYTE_ARABIC_ISO8859_6  -127 /* (CHARSET_ID_OFFSET_96 + 'G') */
 
 /* Right half of ISO 8859-8 */
-#define LEADING_BYTE_HEBREW_ISO8859_8  138 /* (CHARSET_ID_OFFSET_96 + 'H') */
+#define LEADING_BYTE_HEBREW_ISO8859_8  -138 /* (CHARSET_ID_OFFSET_96 + 'H') */
 
 /* Right half of ISO 8859-5 */
-#define LEADING_BYTE_CYRILLIC_ISO8859_5        144 /* (CHARSET_ID_OFFSET_96 + 'L') */
+#define LEADING_BYTE_CYRILLIC_ISO8859_5        -144 /* (CHARSET_ID_OFFSET_96 + 'L') */
 
 /* Right half of ISO 8859-9 */
-#define LEADING_BYTE_LATIN_ISO8859_9   148 /* (CHARSET_ID_OFFSET_96 + 'M') */
+#define LEADING_BYTE_LATIN_ISO8859_9   -148 /* (CHARSET_ID_OFFSET_96 + 'M') */
 
 /* TIS620-2533 */
-#define LEADING_BYTE_THAI_TIS620       166 /* (CHARSET_ID_OFFSET_96 + 'T') */
+#define LEADING_BYTE_THAI_TIS620       -166 /* (CHARSET_ID_OFFSET_96 + 'T') */
 
 /* Right-hand Part of the VSCII-2 (TCVN 5712:1983) */
-#define LEADING_BYTE_LATIN_TCVN5712    180 /* F = 5/10 0x5A `Z' */
+#define LEADING_BYTE_LATIN_TCVN5712    -180 /* F = 5/10 0x5A `Z' */
 
 
 /* #define CHARSET_ID_OFFSET_94x94             (CHARSET_ID_OFFSET_96 + 80) */
@@ -162,49 +160,50 @@ typedef short Charset_ID;
 /* #define MAX_LEADING_BYTE_PRIVATE_2  ('?' + CHARSET_ID_OFFSET_94x94) */
 
 /* Japanese JIS X0208-1978     2/4 2/{(8),9,10,11} 4/0 (@) */
-#define LEADING_BYTE_JAPANESE_JISX0208_1978     42
+#define LEADING_BYTE_JAPANESE_JISX0208_1978     -42
 
 /* Chinese Hanzi GB2312-1980   2/4 2/{(8),9,10,11} 4/1 (A) */
-#define LEADING_BYTE_CHINESE_GB2312             58
+#define LEADING_BYTE_CHINESE_GB2312             -58
 
 /* Japanese JIS X0208-1983     2/4 2/{(8),9,10,11} 4/2 (B) */
-#define LEADING_BYTE_JAPANESE_JISX0208          87
+#define LEADING_BYTE_JAPANESE_JISX0208          -87
 
 /* Hangul KS C5601-1987                2/4 2/{8,9,10,11} 4/3 (C) */
-#define LEADING_BYTE_KOREAN_KSC5601            149
+#define LEADING_BYTE_KOREAN_KSC5601            -149
 
 /* Japanese JIS X0212-1990     2/4 2/{8,9,10,11} 4/4 (D) */
-#define LEADING_BYTE_JAPANESE_JISX0212         159
+#define LEADING_BYTE_JAPANESE_JISX0212         -159
 
 /* CCITT Extended GB           2/4 2/{8,9,10,11} 4/5 (E) */
-#define LEADING_BYTE_CHINESE_CCITT_GB          165
+#define LEADING_BYTE_CHINESE_CCITT_GB          -165
 
 /* Chinese CNS11643 Set 1      2/4 2/{8,9,10,11} 4/7 (G) */
-#define LEADING_BYTE_CHINESE_CNS11643_1                171
+#define LEADING_BYTE_CHINESE_CNS11643_1                -171
 
 /* Chinese CNS11643 Set 2      2/4 2/{8,9,10,11} 4/8 (H) */
-#define LEADING_BYTE_CHINESE_CNS11643_2                172
+#define LEADING_BYTE_CHINESE_CNS11643_2                -172
 
 /* Chinese CNS11643 Set 3      2/4 2/{8,9,10,11} 4/9 (I) */
-#define LEADING_BYTE_CHINESE_CNS11643_3                183
+#define LEADING_BYTE_CHINESE_CNS11643_3                -183
 
 /* Chinese CNS11643 Set 4      2/4 2/{8,9,10,11} 4/10 (J) */
-#define LEADING_BYTE_CHINESE_CNS11643_4                184
+#define LEADING_BYTE_CHINESE_CNS11643_4                -184
 
 /* Chinese CNS11643 Set 5      2/4 2/{8,9,10,11} 4/11 (K) */
-#define LEADING_BYTE_CHINESE_CNS11643_5                185
+#define LEADING_BYTE_CHINESE_CNS11643_5                -185
 
 /* Chinese CNS11643 Set 6      2/4 2/{8,9,10,11} 4/12 (L) */
-#define LEADING_BYTE_CHINESE_CNS11643_6                186
+#define LEADING_BYTE_CHINESE_CNS11643_6                -186
 
 /* Chinese CNS11643 Set 7      2/4 2/{8,9,10,11} 4/13 (M) */
-#define LEADING_BYTE_CHINESE_CNS11643_7                187
+#define LEADING_BYTE_CHINESE_CNS11643_7                -187
 
 /* DPRK Hangul KPS 9566-1997   2/4 2/{8,9,10,11} 4/14 (N) */
-#define LEADING_BYTE_KOREAN_KPS9566            202
+#define LEADING_BYTE_KOREAN_KPS9566            -202
 
+#define MIN_LEADING_BYTE       (- 80 * 3)
 
-#define NUM_LEADING_BYTES      (80 * 3 - MIN_LEADING_BYTE)
+#define NUM_LEADING_BYTES      (MAX_LEADING_BYTE_PRIVATE - MIN_LEADING_BYTE)
 
 \f
 /************************************************************************/