typedef short Charset_ID;
-#define MIN_LEADING_BYTE -0x200
-
/* ISO/IEC 10646 */
-#define LEADING_BYTE_UCS (MIN_LEADING_BYTE + 1)
+#define LEADING_BYTE_UCS -177
/* represent normal 80-9F */
-#define LEADING_BYTE_CONTROL_1 (MIN_LEADING_BYTE + 2)
+#define LEADING_BYTE_CONTROL_1 -77
/* ISO/IEC 10646 BMP */
-#define LEADING_BYTE_UCS_BMP (MIN_LEADING_BYTE + 3)
+#define LEADING_BYTE_UCS_BMP -176
/* ISO/IEC 10646 SMP */
-#define LEADING_BYTE_UCS_SMP (MIN_LEADING_BYTE + 4)
+#define LEADING_BYTE_UCS_SMP 1
/* ISO/IEC 10646 SIP */
-#define LEADING_BYTE_UCS_SIP (MIN_LEADING_BYTE + 5)
+#define LEADING_BYTE_UCS_SIP 2
/* Japanese JIS X0208 Common 2/4 2/{(8),9,10,11} 4/2 (B) */
-#define LEADING_BYTE_JIS_X0208 (MIN_LEADING_BYTE + 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_JIS_X0208 3
/* Chinese GB 12345-1990 */
-#define LEADING_BYTE_CHINESE_GB12345 (MIN_LEADING_BYTE + 13)
+#define LEADING_BYTE_CHINESE_GB12345 4
-#define LEADING_BYTE_CHINESE_BIG5 (MIN_LEADING_BYTE + 20)
+#define LEADING_BYTE_CHINESE_BIG5 5
/* 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 6
/* 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 7
/* VISCII 1.1 */
-#define LEADING_BYTE_LATIN_VISCII (MIN_LEADING_BYTE + 24)
+#define LEADING_BYTE_LATIN_VISCII 8
/* MULE VISCII-LOWER (CHARSET_ID_OFFSET_96 + '1') */
-#define LEADING_BYTE_LATIN_VISCII_LOWER (MIN_LEADING_BYTE + 25)
+#define LEADING_BYTE_LATIN_VISCII_LOWER 9
/* MULE VISCII-UPPER (CHARSET_ID_OFFSET_96 + '2') */
-#define LEADING_BYTE_LATIN_VISCII_UPPER (MIN_LEADING_BYTE + 26)
+#define LEADING_BYTE_LATIN_VISCII_UPPER 10
-#define LEADING_BYTE_ETHIOPIC_UCS (MIN_LEADING_BYTE + 27)
+#define LEADING_BYTE_ETHIOPIC_UCS 11
-#define MIN_LEADING_BYTE_PRIVATE (MIN_LEADING_BYTE + 97)
-#define MAX_LEADING_BYTE_PRIVATE -1
+#define MIN_LEADING_BYTE_PRIVATE 12
+#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) */
-
-/* #define MIN_LEADING_BYTE_PRIVATE_2 ('0' + CHARSET_ID_OFFSET_94x94) */
-/* #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
+
+/* Japanese JIS X0208-1990 2/4 2/{(8),9,10,11} 4/2 (B) */
+#define LEADING_BYTE_JAPANESE_JISX0208_1990 -168
/* 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
/************************************************************************/
Lisp_Object Qreverse_direction_charset;
Lisp_Object Qleading_byte;
Lisp_Object Qshort_name, Qlong_name;
+Lisp_Object Qiso_ir;
#ifdef UTF2000
Lisp_Object Qmin_code, Qmax_code, Qcode_offset;
Lisp_Object Qmother, Qconversion, Q94x60, Q94x94x60;
*/
(name, doc_string, props))
{
- int id, dimension = 1, chars = 94, graphic = 0, final = 0, columns = -1;
+ int id = 0, dimension = 1, chars = 94, graphic = 0, final = 0, columns = -1;
int direction = CHARSET_LEFT_TO_RIGHT;
Lisp_Object registry = Qnil;
Lisp_Object charset;
long_name = value;
}
+ else if (EQ (keyword, Qiso_ir))
+ {
+#ifdef UTF2000
+ CHECK_INT (value);
+ id = - XINT (value);
+#endif
+ }
+
else if (EQ (keyword, Qdimension))
{
CHECK_INT (value);
error
("Character set already defined for this DIMENSION/CHARS/FINAL combo");
- id = get_unallocated_leading_byte (dimension);
+ if (id == 0)
+ id = get_unallocated_leading_byte (dimension);
if (NILP (doc_string))
doc_string = build_string ("");
defsymbol (&Qreverse_direction_charset, "reverse-direction-charset");
defsymbol (&Qshort_name, "short-name");
defsymbol (&Qlong_name, "long-name");
+ defsymbol (&Qiso_ir, "iso-ir");
#ifdef UTF2000
defsymbol (&Qmother, "mother");
defsymbol (&Qmin_code, "min-code");