1 /* Header for UCS-4 character representation.
2 Copyright (C) 1999 Electrotechnical Laboratory, JAPAN.
3 Licensed to the Free Software Foundation.
5 This file is part of XEmacs.
7 XEmacs is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 2, or (at your option) any
12 XEmacs is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 You should have received a copy of the GNU General Public License
18 along with XEmacs; see the file COPYING. If not, write to
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
22 /* Rewritten by MORIOKA Tomohiko <tomo@m17n.org>. */
24 #ifndef _XEMACS_CHAR_UCS_H
25 #define _XEMACS_CHAR_UCS_H
27 #define valid_char_p(ch) 1
29 #define CHAR_ASCII_P(ch) ((ch) <= 0x7F)
32 DECLARE_LRECORD (char_byte_table, struct Lisp_Char_Byte_Table);
33 #define XCHAR_BYTE_TABLE(x) \
34 XRECORD (x, char_byte_table, struct Lisp_Char_Byte_Table)
35 #define XSETCHAR_BYTE_TABLE(x, p) XSETRECORD (x, p, char_byte_table)
36 #define CHAR_BYTE_TABLE_P(x) RECORDP (x, char_byte_table)
37 #define GC_CHAR_BYTE_TABLE_P(x) GC_RECORDP (x, char_byte_table)
38 /* #define CHECK_CHAR_BYTE_TABLE(x) CHECK_RECORD (x, char_byte_table)
39 char table entries should never escape to Lisp */
41 struct Lisp_Char_Byte_Table
43 struct lcrecord_header header;
45 Lisp_Object property[256];
49 DECLARE_LRECORD (char_code_table, struct Lisp_Char_Code_Table);
50 #define XCHAR_CODE_TABLE(x) \
51 XRECORD (x, char_code_table, struct Lisp_Char_Code_Table)
52 #define XSETCHAR_CODE_TABLE(x, p) XSETRECORD (x, p, char_code_table)
53 #define CHAR_CODE_TABLE_P(x) RECORDP (x, char_code_table)
54 #define GC_CHAR_CODE_TABLE_P(x) GC_RECORDP (x, char_code_table)
55 /* #define CHECK_CHAR_CODE_TABLE(x) CHECK_RECORD (x, char_code_table)
56 char table entries should never escape to Lisp */
58 struct Lisp_Char_Code_Table
60 struct lcrecord_header header;
65 Lisp_Object get_char_code_table (Emchar ch, Lisp_Object table);
68 extern Lisp_Object Vcharset_ucs_bmp;
69 extern Lisp_Object Vcharset_latin_jisx0201;
70 extern Lisp_Object Vcharset_latin_iso8859_2;
71 extern Lisp_Object Vcharset_latin_iso8859_3;
72 extern Lisp_Object Vcharset_latin_iso8859_4;
73 extern Lisp_Object Vcharset_latin_iso8859_9;
74 extern Lisp_Object Vcharset_latin_viscii_lower;
75 extern Lisp_Object Vcharset_latin_viscii_upper;
78 /************************************************************************/
79 /* Definition of leading bytes */
80 /************************************************************************/
82 typedef int Charset_ID;
84 #define MIN_LEADING_BYTE -0x40
85 #define CHARSET_ID_OFFSET 0x00
87 /* represent normal 80-9F */
88 #define LEADING_BYTE_CONTROL_1 (CHARSET_ID_OFFSET - 1)
90 /* ISO/IEC 10646 BMP */
91 #define LEADING_BYTE_UCS_BMP (CHARSET_ID_OFFSET - 2)
94 #define LEADING_BYTE_LATIN_VISCII (CHARSET_ID_OFFSET - 3)
96 /* MULE VISCII-LOWER (CHARSET_ID_OFFSET_96 + '1') */
97 #define LEADING_BYTE_LATIN_VISCII_LOWER (CHARSET_ID_OFFSET - 4)
99 /* MULE VISCII-UPPER (CHARSET_ID_OFFSET_96 + '2') */
100 #define LEADING_BYTE_LATIN_VISCII_UPPER (CHARSET_ID_OFFSET - 5)
102 /* Big5 Level 1 2/4 2/{(8),9,10,11} 4/0 '0' */
103 #define LEADING_BYTE_CHINESE_BIG5_1 (CHARSET_ID_OFFSET - 6)
105 /* Big5 Level 2 2/4 2/{(8),9,10,11} 4/0 '1' */
106 #define LEADING_BYTE_CHINESE_BIG5_2 (CHARSET_ID_OFFSET - 7)
108 #define LEADING_BYTE_ETHIOPIC_UCS (CHARSET_ID_OFFSET - 8)
110 #define LEADING_BYTE_DAIKANWA (CHARSET_ID_OFFSET - 9)
112 #define MIN_LEADING_BYTE_PRIVATE MIN_LEADING_BYTE
113 #define MAX_LEADING_BYTE_PRIVATE (CHARSET_ID_OFFSET - 10)
116 /* #define CHARSET_ID_OFFSET_94 (CHARSET_ID_OFFSET - '0') */
118 /* #define MIN_CHARSET_ID_PRIVATE_94 (CHARSET_ID_OFFSET_94 + '0') */
119 /* #define MAX_CHARSET_ID_PRIVATE_94 (CHARSET_ID_OFFSET_94 + '?') */
122 #define LEADING_BYTE_ASCII 6 /* (CHARSET_ID_OFFSET_94 + 'B') */
124 /* Right half of JIS X0201-1976 */
125 #define LEADING_BYTE_KATAKANA_JISX0201 13 /* (CHARSET_ID_OFFSET_94 + 'I') */
127 /* Left half of JIS X0201-1976 */
128 #define LEADING_BYTE_LATIN_JISX0201 14 /* (CHARSET_ID_OFFSET_94 + 'J') */
131 /* #define CHARSET_ID_OFFSET_96 (CHARSET_ID_OFFSET_94 + 80) */
133 /* Right half of ISO 8859-1 */
134 #define LEADING_BYTE_LATIN_ISO8859_1 100 /* (CHARSET_ID_OFFSET_96 + 'A') */
136 /* Right half of ISO 8859-2 */
137 #define LEADING_BYTE_LATIN_ISO8859_2 101 /* (CHARSET_ID_OFFSET_96 + 'B') */
139 /* Right half of ISO 8859-3 */
140 #define LEADING_BYTE_LATIN_ISO8859_3 109 /* (CHARSET_ID_OFFSET_96 + 'C') */
142 /* Right half of ISO 8859-4 */
143 #define LEADING_BYTE_LATIN_ISO8859_4 110 /* (CHARSET_ID_OFFSET_96 + 'D') */
145 /* Right half of ISO 8859-7 */
146 #define LEADING_BYTE_GREEK_ISO8859_7 126 /* (CHARSET_ID_OFFSET_96 + 'F') */
148 /* Right half of ISO 8859-6 */
149 #define LEADING_BYTE_ARABIC_ISO8859_6 127 /* (CHARSET_ID_OFFSET_96 + 'G') */
151 /* Right half of ISO 8859-8 */
152 #define LEADING_BYTE_HEBREW_ISO8859_8 138 /* (CHARSET_ID_OFFSET_96 + 'H') */
154 /* Right half of ISO 8859-5 */
155 #define LEADING_BYTE_CYRILLIC_ISO8859_5 144 /* (CHARSET_ID_OFFSET_96 + 'L') */
157 /* Right half of ISO 8859-9 */
158 #define LEADING_BYTE_LATIN_ISO8859_9 148 /* (CHARSET_ID_OFFSET_96 + 'M') */
161 #define LEADING_BYTE_THAI_TIS620 166 /* (CHARSET_ID_OFFSET_96 + 'T') */
164 /* #define CHARSET_ID_OFFSET_94x94 (CHARSET_ID_OFFSET_96 + 80) */
167 /* #define MIN_LEADING_BYTE_PRIVATE_2 ('0' + CHARSET_ID_OFFSET_94x94) */
168 /* #define MAX_LEADING_BYTE_PRIVATE_2 ('?' + CHARSET_ID_OFFSET_94x94) */
170 /* Japanese JIS X0208-1978 2/4 2/{(8),9,10,11} 4/0 (@) */
171 #define LEADING_BYTE_JAPANESE_JISX0208_1978 42
173 /* Chinese Hanzi GB2312-1980 2/4 2/{(8),9,10,11} 4/1 (A) */
174 #define LEADING_BYTE_CHINESE_GB2312 58
176 /* Japanese JIS X0208-1983 2/4 2/{(8),9,10,11} 4/2 (B) */
177 #define LEADING_BYTE_JAPANESE_JISX0208 87
179 /* Hangul KS C5601-1987 2/4 2/{8,9,10,11} 4/3 (C) */
180 #define LEADING_BYTE_KOREAN_KSC5601 149
182 /* Japanese JIS X0212-1990 2/4 2/{8,9,10,11} 4/4 (D) */
183 #define LEADING_BYTE_JAPANESE_JISX0212 159
185 /* CCITT Extended GB 2/4 2/{8,9,10,11} 4/5 (E) */
186 #define LEADING_BYTE_CHINESE_CCITT_GB 165
188 /* Chinese CNS11643 Set 1 2/4 2/{8,9,10,11} 4/7 (G) */
189 #define LEADING_BYTE_CHINESE_CNS11643_1 171
191 /* Chinese CNS11643 Set 2 2/4 2/{8,9,10,11} 4/8 (H) */
192 #define LEADING_BYTE_CHINESE_CNS11643_2 172
194 /* Chinese CNS11643 Set 3 2/4 2/{8,9,10,11} 4/9 (I) */
195 #define LEADING_BYTE_CHINESE_CNS11643_3 183
197 /* Chinese CNS11643 Set 4 2/4 2/{8,9,10,11} 4/10 (J) */
198 #define LEADING_BYTE_CHINESE_CNS11643_4 184
200 /* Chinese CNS11643 Set 5 2/4 2/{8,9,10,11} 4/11 (K) */
201 #define LEADING_BYTE_CHINESE_CNS11643_5 185
203 /* Chinese CNS11643 Set 6 2/4 2/{8,9,10,11} 4/12 (L) */
204 #define LEADING_BYTE_CHINESE_CNS11643_6 186
206 /* Chinese CNS11643 Set 7 2/4 2/{8,9,10,11} 4/13 (M) */
207 #define LEADING_BYTE_CHINESE_CNS11643_7 187
209 /* DPRK Hangul KPS 9566-1997 2/4 2/{8,9,10,11} 4/14 (N) */
210 #define LEADING_BYTE_KOREAN_KPS9566 202
213 #define NUM_LEADING_BYTES (80 * 3 - MIN_LEADING_BYTE)
216 /************************************************************************/
217 /* Information about a particular character set */
218 /************************************************************************/
222 struct lcrecord_header header;
226 Lisp_Object doc_string, registry, short_name, long_name;
228 Lisp_Object reverse_direction_charset;
230 Lisp_Object ccl_program;
232 /* Final byte of this character set in ISO2022 designating escape sequence */
235 /* Number of columns a character in this charset takes up, on TTY
236 devices. Not used for X devices. */
237 unsigned int columns;
239 /* Direction of this character set */
240 unsigned int direction;
242 /* Type of this character set (94, 96, 94x94, 96x96) */
245 /* Number of bytes used in encoding of this character set (1 or 2) */
246 unsigned int dimension;
248 /* Number of chars in each dimension (usually 94 or 96) */
251 /* Which half of font to be used to display this character set */
252 unsigned int graphic;
254 /* Byte->character mapping table */
255 Lisp_Object decoding_table;
257 /* Range of character code */
258 Emchar ucs_min, ucs_max;
260 /* Offset for external code */
263 /* Offset for each byte */
267 DECLARE_LRECORD (charset, struct Lisp_Charset);
268 #define XCHARSET(x) XRECORD (x, charset, struct Lisp_Charset)
269 #define XSETCHARSET(x, p) XSETRECORD (x, p, charset)
270 #define CHARSETP(x) RECORDP (x, charset)
271 #define GC_CHARSETP(x) GC_RECORDP (x, charset)
272 #define CHECK_CHARSET(x) CHECK_RECORD (x, charset)
273 #define CONCHECK_CHARSET(x) CONCHECK_RECORD (x, charset)
275 #define CHARSET_TYPE_94 0 /* This charset includes 94 characters. */
276 #define CHARSET_TYPE_94X94 1 /* This charset includes 94x94 characters. */
277 #define CHARSET_TYPE_96 2 /* This charset includes 96 characters. */
278 #define CHARSET_TYPE_96X96 3 /* This charset includes 96x96 characters. */
279 #define CHARSET_TYPE_128 4 /* This charset includes 128 characters. */
280 #define CHARSET_TYPE_128X128 5 /* This charset includes 128x128 characters. */
281 #define CHARSET_TYPE_256 6 /* This charset includes 256 characters. */
282 #define CHARSET_TYPE_256X256 7 /* This charset includes 256x256 characters. */
284 #define CHARSET_LEFT_TO_RIGHT 0
285 #define CHARSET_RIGHT_TO_LEFT 1
287 /* Leading byte and id have been regrouped. -- OG */
288 #define CHARSET_ID(cs) ((cs)->id)
289 #define CHARSET_LEADING_BYTE(cs) (CHARSET_ID(cs))
290 #define CHARSET_NAME(cs) ((cs)->name)
291 #define CHARSET_SHORT_NAME(cs) ((cs)->short_name)
292 #define CHARSET_LONG_NAME(cs) ((cs)->long_name)
293 #define CHARSET_COLUMNS(cs) ((cs)->columns)
294 #define CHARSET_GRAPHIC(cs) ((cs)->graphic)
295 #define CHARSET_TYPE(cs) ((cs)->type)
296 #define CHARSET_DIRECTION(cs) ((cs)->direction)
297 #define CHARSET_FINAL(cs) ((cs)->final)
298 #define CHARSET_DOC_STRING(cs) ((cs)->doc_string)
299 #define CHARSET_REGISTRY(cs) ((cs)->registry)
300 #define CHARSET_CCL_PROGRAM(cs) ((cs)->ccl_program)
301 #define CHARSET_DIMENSION(cs) ((cs)->dimension)
302 #define CHARSET_CHARS(cs) ((cs)->chars)
303 #define CHARSET_REVERSE_DIRECTION_CHARSET(cs) ((cs)->reverse_direction_charset)
304 #define CHARSET_DECODING_TABLE(cs) ((cs)->decoding_table)
305 #define CHARSET_UCS_MIN(cs) ((cs)->ucs_min)
306 #define CHARSET_UCS_MAX(cs) ((cs)->ucs_max)
307 #define CHARSET_CODE_OFFSET(cs) ((cs)->code_offset)
308 #define CHARSET_BYTE_OFFSET(cs) ((cs)->byte_offset)
311 #define XCHARSET_ID(cs) CHARSET_ID (XCHARSET (cs))
312 #define XCHARSET_NAME(cs) CHARSET_NAME (XCHARSET (cs))
313 #define XCHARSET_SHORT_NAME(cs) CHARSET_SHORT_NAME (XCHARSET (cs))
314 #define XCHARSET_LONG_NAME(cs) CHARSET_LONG_NAME (XCHARSET (cs))
315 #define XCHARSET_GRAPHIC(cs) CHARSET_GRAPHIC (XCHARSET (cs))
316 #define XCHARSET_TYPE(cs) CHARSET_TYPE (XCHARSET (cs))
317 #define XCHARSET_DIRECTION(cs) CHARSET_DIRECTION (XCHARSET (cs))
318 #define XCHARSET_FINAL(cs) CHARSET_FINAL (XCHARSET (cs))
319 #define XCHARSET_DOC_STRING(cs) CHARSET_DOC_STRING (XCHARSET (cs))
320 #define XCHARSET_REGISTRY(cs) CHARSET_REGISTRY (XCHARSET (cs))
321 #define XCHARSET_LEADING_BYTE(cs) CHARSET_LEADING_BYTE (XCHARSET (cs))
322 #define XCHARSET_CCL_PROGRAM(cs) CHARSET_CCL_PROGRAM (XCHARSET (cs))
323 #define XCHARSET_DIMENSION(cs) CHARSET_DIMENSION (XCHARSET (cs))
324 #define XCHARSET_CHARS(cs) CHARSET_CHARS (XCHARSET (cs))
325 #define XCHARSET_REVERSE_DIRECTION_CHARSET(cs) \
326 CHARSET_REVERSE_DIRECTION_CHARSET (XCHARSET (cs))
327 #define XCHARSET_DECODING_TABLE(cs) CHARSET_DECODING_TABLE(XCHARSET(cs))
328 #define XCHARSET_UCS_MIN(cs) CHARSET_UCS_MIN(XCHARSET(cs))
329 #define XCHARSET_UCS_MAX(cs) CHARSET_UCS_MAX(XCHARSET(cs))
330 #define XCHARSET_CODE_OFFSET(cs) CHARSET_CODE_OFFSET(XCHARSET(cs))
331 #define XCHARSET_BYTE_OFFSET(cs) CHARSET_BYTE_OFFSET(XCHARSET(cs))
333 /* Table of charsets indexed by (leading byte - 128). */
334 extern Lisp_Object charset_by_leading_byte[NUM_LEADING_BYTES];
336 /* Table of charsets indexed by type/final-byte. */
337 extern Lisp_Object charset_by_attributes[4][128];
339 #ifdef ERROR_CHECK_TYPECHECK
340 /* int not Bufbyte even though that is the actual type of a leading byte.
341 This way, out-ot-range values will get caught rather than automatically
343 INLINE Lisp_Object CHARSET_BY_LEADING_BYTE (Charset_ID lb);
345 CHARSET_BY_LEADING_BYTE (Charset_ID lb)
347 assert (lb >= MIN_LEADING_BYTE &&
348 lb < (MIN_LEADING_BYTE + NUM_LEADING_BYTES));
349 return charset_by_leading_byte[lb - MIN_LEADING_BYTE];
354 #define CHARSET_BY_LEADING_BYTE(lb) \
355 (charset_by_leading_byte[(lb) - MIN_LEADING_BYTE])
359 #define CHARSET_BY_ATTRIBUTES(type, final, dir) \
360 (charset_by_attributes[type][final])
363 /************************************************************************/
364 /* Dealing with characters */
365 /************************************************************************/
367 #define MAX_CHAR_BASIC_LATIN 0x007F
369 #define MIN_CHAR_GREEK 0x0370
370 #define MAX_CHAR_GREEK 0x03CF
372 #define MIN_CHAR_CYRILLIC 0x0400
373 #define MAX_CHAR_CYRILLIC 0x045F
375 #define MIN_CHAR_HEBREW 0x0590
376 #define MAX_CHAR_HEBREW 0x05EF
378 #define MIN_CHAR_THAI 0x0E00
379 #define MAX_CHAR_THAI 0x0E5F
381 #define MIN_CHAR_HIRAGANA 0x3041
382 #define MAX_CHAR_HIRAGANA 0x3093
384 #define MIN_CHAR_KATAKANA 0x30A1
385 #define MAX_CHAR_KATAKANA 0x30F6
387 #define MIN_CHAR_HALFWIDTH_KATAKANA 0xFF61
388 #define MAX_CHAR_HALFWIDTH_KATAKANA 0xFF9F
390 #define MIN_CHAR_OBS_94x94 0xE00000
391 #define MAX_CHAR_OBS_94x94 (0xE00000 + 94 * 94 * 14 - 1)
393 #define MIN_CHAR_DAIKANWA 0xE50000
394 #define MAX_CHAR_DAIKANWA 0xE5FFFF
396 #define MIN_CHAR_94 0xE90940
397 #define MAX_CHAR_94 (MIN_CHAR_94 + 94 * 80 - 1)
398 #define MIN_CHAR_96 (MIN_CHAR_94 + 94 * 80)
399 #define MAX_CHAR_96 (MIN_CHAR_96 + 96 * 80 - 1)
401 #define MIN_CHAR_94x94 0xE9F6C0
402 #define MAX_CHAR_94x94 (MIN_CHAR_94x94 + 94 * 94 * 80 - 1)
403 #define MIN_CHAR_96x96 0xF4C000
404 #define MAX_CHAR_96x96 (MIN_CHAR_96x96 + 96 * 96 * 80 - 1)
407 /* Return a character whose charset is CHARSET and position-codes
408 are C1 and C2. TYPE9N character ignores C2. */
410 INLINE Emchar MAKE_CHAR (Lisp_Object charset, int c1, int c2);
412 MAKE_CHAR (Lisp_Object charset, int c1, int c2)
414 Lisp_Object decoding_table = XCHARSET_DECODING_TABLE (charset);
418 if (!EQ (decoding_table, Qnil)
419 && (0 <= (idx = c1 - XCHARSET_BYTE_OFFSET (charset)))
420 && (idx < XVECTOR_LENGTH (decoding_table))
421 && !EQ (ch = XVECTOR_DATA(decoding_table)[idx], Qnil))
425 if ((0 <= (idx = c2 - XCHARSET_BYTE_OFFSET (charset)))
426 && (idx < XVECTOR_LENGTH (ch))
427 && !EQ (ch = XVECTOR_DATA(ch)[idx], Qnil))
433 if (EQ (charset, Vcharset_katakana_jisx0201))
435 return c1 + MIN_CHAR_HALFWIDTH_KATAKANA - 33;
437 /* return MIN_CHAR_94 + ('I' - '0') * 94 + (c1 - 33); */
439 else if (XCHARSET_UCS_MAX (charset))
442 = (XCHARSET_DIMENSION (charset) == 1
444 c1 - XCHARSET_BYTE_OFFSET (charset)
446 (c1 - XCHARSET_BYTE_OFFSET (charset)) * XCHARSET_CHARS (charset)
447 + c2 - XCHARSET_BYTE_OFFSET (charset))
448 - XCHARSET_CODE_OFFSET (charset) + XCHARSET_UCS_MIN (charset);
449 if ((code < XCHARSET_UCS_MIN (charset))
450 || (XCHARSET_UCS_MAX (charset) < code))
451 signal_simple_error ("Arguments makes invalid character",
455 else if (XCHARSET_DIMENSION (charset) == 1)
457 switch (XCHARSET_CHARS (charset))
461 + (XCHARSET_FINAL (charset) - '0') * 94 + (c1 - 33);
464 + (XCHARSET_FINAL (charset) - '0') * 96 + (c1 - 32);
471 switch (XCHARSET_CHARS (charset))
474 return MIN_CHAR_94x94
475 + (XCHARSET_FINAL (charset) - '0') * 94 * 94
476 + (c1 - 33) * 94 + (c2 - 33);
478 return MIN_CHAR_96x96
479 + (XCHARSET_FINAL (charset) - '0') * 96 * 96
480 + (c1 - 32) * 96 + (c2 - 32);
487 extern Lisp_Object Vcharacter_attribute_table;
489 Lisp_Object split_builtin_char (Emchar c);
490 Lisp_Object range_charset_code_point (Lisp_Object charset, Emchar ch);
491 Lisp_Object charset_code_point (Lisp_Object charset, Emchar ch);
493 extern Lisp_Object Vdefault_coded_charset_priority_list;
494 EXFUN (Ffind_charset, 1);
496 INLINE Lisp_Object SPLIT_CHAR (Emchar c);
498 SPLIT_CHAR (Emchar c)
500 Lisp_Object cdef = get_char_code_table (c, Vcharacter_attribute_table);
502 if (!EQ (cdef, Qnil))
504 Lisp_Object charsets = Vdefault_coded_charset_priority_list;
507 while (!EQ (charsets, Qnil))
509 Lisp_Object charset = Ffind_charset (Fcar (charsets));
511 if (!EQ (charset, Qnil))
513 if (!NILP (field = Fassq (charset, cdef)))
515 else if (!NILP (field = range_charset_code_point (charset, c)))
516 return Fcons (charset, field);
518 charsets = Fcdr (charsets);
522 /* otherwise --- maybe for bootstrap */
523 return split_builtin_char (c);
526 INLINE void breakup_char_1 (Emchar c, Lisp_Object *charset, int *c1, int *c2);
528 breakup_char_1 (Emchar c, Lisp_Object *charset, int *c1, int *c2)
530 Lisp_Object ret = SPLIT_CHAR (c);
532 *charset = Fcar (ret);
534 if (INTP (Fcar (ret)))
536 *c1 = XINT (Fcar (ret));
538 if (INTP (Fcar (ret)))
539 *c2 = XINT (Fcar (ret));
549 #define BREAKUP_CHAR(ch, charset, b1, b2) \
550 breakup_char_1 (ch, &(charset), &(b1), &(b2))
552 INLINE Lisp_Object CHAR_CHARSET (Emchar ch);
554 CHAR_CHARSET (Emchar ch)
559 BREAKUP_CHAR(ch, charset, b1, b2);
563 #define CHAR_CHARSET_ID(c) (XCHARSET_ID(CHAR_CHARSET(c)))
564 #define CHAR_COLUMNS(c) (CHARSET_COLUMNS(XCHARSET(CHAR_CHARSET(c))))
567 /************************************************************************/
568 /* Exported functions */
569 /************************************************************************/
571 EXFUN (Fget_charset, 1);
573 extern Lisp_Object Vcharset_chinese_big5_1;
574 extern Lisp_Object Vcharset_chinese_big5_2;
575 extern Lisp_Object Vcharset_japanese_jisx0208;
576 extern Lisp_Object Vcharset_japanese_jisx0212;
578 #endif /* _XEMACS_CHAR_UCS_H */