-#ifndef CHAR_IS_UCS4
-#include "mule-charset.h"
-#else
-
-/************************************************************************/
-/* Definition of leading bytes */
-/************************************************************************/
-
-#define MIN_LEADING_BYTE 0x80
-/* These need special treatment in a string and/or character */
-#define LEADING_BYTE_ASCII 0x8E /* Omitted in a buffer */
-#ifdef ENABLE_COMPOSITE_CHARS
-#endif
-#define LEADING_BYTE_COMPOSITE 0x80 /* for a composite character */
-#define LEADING_BYTE_CONTROL_1 0x8F /* represent normal 80-9F */
-
-/** The following are for 1-byte characters in an official charset. **/
-
-#define LEADING_BYTE_LATIN_ISO8859_1 0x81 /* Right half of ISO 8859-1 */
-#define LEADING_BYTE_LATIN_ISO8859_2 0x82 /* Right half of ISO 8859-2 */
-#define LEADING_BYTE_LATIN_ISO8859_3 0x83 /* Right half of ISO 8859-3 */
-#define LEADING_BYTE_LATIN_ISO8859_4 0x84 /* Right half of ISO 8859-4 */
-#define LEADING_BYTE_THAI_TIS620 0x85 /* TIS620-2533 */
-#define LEADING_BYTE_GREEK_ISO8859_7 0x86 /* Right half of ISO 8859-7 */
-#define LEADING_BYTE_ARABIC_ISO8859_6 0x87 /* Right half of ISO 8859-6 */
-#define LEADING_BYTE_HEBREW_ISO8859_8 0x88 /* Right half of ISO 8859-8 */
-#define LEADING_BYTE_KATAKANA_JISX0201 0x89 /* Right half of JIS X0201-1976 */
-#define LEADING_BYTE_LATIN_JISX0201 0x8A /* Left half of JIS X0201-1976 */
-#define LEADING_BYTE_CYRILLIC_ISO8859_5 0x8C /* Right half of ISO 8859-5 */
-#define LEADING_BYTE_LATIN_ISO8859_9 0x8D /* Right half of ISO 8859-9 */
-
-#define MIN_LEADING_BYTE_OFFICIAL_1 LEADING_BYTE_LATIN_ISO8859_1
-#define MAX_LEADING_BYTE_OFFICIAL_1 LEADING_BYTE_LATIN_ISO8859_9
-
-/** The following are for 2-byte characters in an official charset. **/
-
-#define LEADING_BYTE_JAPANESE_JISX0208_1978 0x90/* Japanese JIS X0208-1978 */
-#define LEADING_BYTE_CHINESE_GB2312 0x91 /* Chinese Hanzi GB2312-1980 */
-#define LEADING_BYTE_JAPANESE_JISX0208 0x92 /* Japanese JIS X0208-1983 */
-#define LEADING_BYTE_KOREAN_KSC5601 0x93 /* Hangul KS C5601-1987 */
-#define LEADING_BYTE_JAPANESE_JISX0212 0x94 /* Japanese JIS X0212-1990 */
-#define LEADING_BYTE_CHINESE_CCITT_GB 0x95 /* CCITT Extended GB */
-#define LEADING_BYTE_CHINESE_BIG5_1 0x96 /* Big5 Level 1 */
-#define LEADING_BYTE_CHINESE_CNS11643_1 0x97 /* Chinese CNS11643 Set 1 */
-#define LEADING_BYTE_CHINESE_CNS11643_2 0x98 /* Chinese CNS11643 Set 2 */
-#define LEADING_BYTE_CHINESE_CNS11643_3 0x99 /* Chinese CNS11643 Set 3 */
-#define LEADING_BYTE_CHINESE_CNS11643_4 0x9A /* Chinese CNS11643 Set 4 */
-#define LEADING_BYTE_CHINESE_CNS11643_5 0x9B /* Chinese CNS11643 Set 5 */
-#define LEADING_BYTE_CHINESE_CNS11643_6 0x9C /* Chinese CNS11643 Set 6 */
-#define LEADING_BYTE_CHINESE_CNS11643_7 0x9D /* Chinese CNS11643 Set 7 */
-#define LEADING_BYTE_CHINESE_BIG5_2 0x9D /* Big5 Level 2 */
-#define LEADING_BYTE_KOREAN_KPS9566 0x9E /* DPRK Hangul KPS 9566-1997 */
-
-#define MIN_LEADING_BYTE_OFFICIAL_2 LEADING_BYTE_JAPANESE_JISX0208_1978
-#define MAX_LEADING_BYTE_OFFICIAL_2 LEADING_BYTE_CHINESE_BIG5_2
-
-/** The following are for 1- and 2-byte characters in a private charset. **/
-
-#define PRE_LEADING_BYTE_PRIVATE_1 0x9E /* 1-byte char-set */
-#define PRE_LEADING_BYTE_PRIVATE_2 0x9F /* 2-byte char-set */
-
-#define MIN_LEADING_BYTE_PRIVATE_1 0xA0
-#define MAX_LEADING_BYTE_PRIVATE_1 0xEF
-#define MIN_LEADING_BYTE_PRIVATE_2 0xF0
-#define MAX_LEADING_BYTE_PRIVATE_2 0xFF
-
-#define NUM_LEADING_BYTES 128
-
-\f
-/************************************************************************/
-/* Operations on leading bytes */
-/************************************************************************/
-
-/* Is this leading byte for a private charset? */
-
-#define LEADING_BYTE_PRIVATE_P(lb) ((lb) >= MIN_LEADING_BYTE_PRIVATE_1)
-
-/* Is this a prefix for a private leading byte? */
-
-INLINE int LEADING_BYTE_PREFIX_P (unsigned char lb);
-INLINE int
-LEADING_BYTE_PREFIX_P (unsigned char lb)
-{
- return (lb == PRE_LEADING_BYTE_PRIVATE_1 ||
- lb == PRE_LEADING_BYTE_PRIVATE_2);
-}
-
-/* Given a private leading byte, return the leading byte prefix stored
- in a string */
-
-#define PRIVATE_LEADING_BYTE_PREFIX(lb) \
- ((lb) < MIN_LEADING_BYTE_PRIVATE_2 ? \
- PRE_LEADING_BYTE_PRIVATE_1 : \
- PRE_LEADING_BYTE_PRIVATE_2)
-
-\f
-/************************************************************************/
-/* Operations on individual bytes */
-/* of any format */
-/************************************************************************/
-
-/* Argument `c' should be (unsigned int) or (unsigned char). */
-/* Note that SP and DEL are not included. */
-
-#define BYTE_ASCII_P(c) ((c) < 0x80)
-#define BYTE_C0_P(c) ((c) < 0x20)
-/* Do some forced casting just to make *sure* things are gotten right. */
-#define BYTE_C1_P(c) ((unsigned int) ((unsigned int) (c) - 0x80) < 0x20)
-
-\f
-/************************************************************************/
-/* Operations on individual bytes */
-/* in a Mule-formatted string */
-/************************************************************************/
-
-/* Does this byte represent the first byte of a character? */
-
-#ifdef UTF2000
-INLINE int
-BUFBYTE_FIRST_BYTE_P(Bufbyte c)
-{
- return (c <= 0x7f) || (0xc0 <= c);
-}
-#else
-#define BUFBYTE_FIRST_BYTE_P(c) ((c) < 0xA0)
-#endif
-
-/* Does this byte represent the first byte of a multi-byte character? */
-
-#define BUFBYTE_LEADING_BYTE_P(c) BYTE_C1_P (c)
-
-\f
-/************************************************************************/
-/* Information about a particular character set */
-/************************************************************************/
-
-struct Lisp_Charset
-{
- struct lcrecord_header header;
-
- int id;
- Lisp_Object name;
- Lisp_Object doc_string, registry, short_name, long_name;
-
- Lisp_Object reverse_direction_charset;
-
- Lisp_Object ccl_program;
-
- /* Final byte of this character set in ISO2022 designating escape sequence */
- Bufbyte final;
-
- /* Number of bytes (1 - 4) required in the internal representation
- for characters in this character set. This is *not* the
- same as the dimension of the character set). */
- unsigned int rep_bytes;
-
- /* Number of columns a character in this charset takes up, on TTY
- devices. Not used for X devices. */
- unsigned int columns;
-
- /* Direction of this character set */
- unsigned int direction;
-
- /* Type of this character set (94, 96, 94x94, 96x96) */
- unsigned int type;
-
- /* Number of bytes used in encoding of this character set (1 or 2) */
- unsigned int dimension;
-
- /* Number of chars in each dimension (usually 94 or 96) */
- unsigned int chars;
-
- /* Which half of font to be used to display this character set */
- unsigned int graphic;
-};
-
-DECLARE_LRECORD (charset, struct Lisp_Charset);
-#define XCHARSET(x) XRECORD (x, charset, struct Lisp_Charset)
-#define XSETCHARSET(x, p) XSETRECORD (x, p, charset)
-#define CHARSETP(x) RECORDP (x, charset)
-#define GC_CHARSETP(x) GC_RECORDP (x, charset)
-#define CHECK_CHARSET(x) CHECK_RECORD (x, charset)
-#define CONCHECK_CHARSET(x) CONCHECK_RECORD (x, charset)
-
-#define CHARSET_TYPE_94 0 /* This charset includes 94 characters. */
-#define CHARSET_TYPE_96 1 /* This charset includes 96 characters. */
-#define CHARSET_TYPE_94X94 2 /* This charset includes 94x94 characters. */
-#define CHARSET_TYPE_96X96 3 /* This charset includes 96x96 characters. */