/* Rewritten by MORIOKA Tomohiko <tomo@m17n.org>. */
-#ifndef _XEMACS_CHAR_UCS_H
-#define _XEMACS_CHAR_UCS_H
+#ifndef INCLUDED_char_ucs_h_
+#define INCLUDED_char_ucs_h_
#define valid_char_p(ch) 1
#define CHAR_ASCII_P(ch) ((ch) <= 0x7F)
\f
-DECLARE_LRECORD (char_byte_table, struct Lisp_Char_Byte_Table);
-#define XCHAR_BYTE_TABLE(x) \
- XRECORD (x, char_byte_table, struct Lisp_Char_Byte_Table)
-#define XSETCHAR_BYTE_TABLE(x, p) XSETRECORD (x, p, char_byte_table)
-#define CHAR_BYTE_TABLE_P(x) RECORDP (x, char_byte_table)
-#define GC_CHAR_BYTE_TABLE_P(x) GC_RECORDP (x, char_byte_table)
-/* #define CHECK_CHAR_BYTE_TABLE(x) CHECK_RECORD (x, char_byte_table)
- char table entries should never escape to Lisp */
-
-struct Lisp_Char_Byte_Table
+struct Lisp_Byte_Table
{
struct lcrecord_header header;
Lisp_Object property[256];
};
-
-
-DECLARE_LRECORD (char_code_table, struct Lisp_Char_Code_Table);
-#define XCHAR_CODE_TABLE(x) \
- XRECORD (x, char_code_table, struct Lisp_Char_Code_Table)
-#define XSETCHAR_CODE_TABLE(x, p) XSETRECORD (x, p, char_code_table)
-#define CHAR_CODE_TABLE_P(x) RECORDP (x, char_code_table)
-#define GC_CHAR_CODE_TABLE_P(x) GC_RECORDP (x, char_code_table)
-/* #define CHECK_CHAR_CODE_TABLE(x) CHECK_RECORD (x, char_code_table)
+typedef struct Lisp_Byte_Table Lisp_Byte_Table;
+
+DECLARE_LRECORD (byte_table, Lisp_Byte_Table);
+#define XBYTE_TABLE(x) XRECORD (x, byte_table, Lisp_Byte_Table)
+#define XSETBYTE_TABLE(x, p) XSETRECORD (x, p, byte_table)
+#define BYTE_TABLE_P(x) RECORDP (x, byte_table)
+#define GC_BYTE_TABLE_P(x) GC_RECORDP (x, byte_table)
+/* #define CHECK_BYTE_TABLE(x) CHECK_RECORD (x, byte_table)
char table entries should never escape to Lisp */
-struct Lisp_Char_Code_Table
+
+struct Lisp_Char_ID_Table
{
struct lcrecord_header header;
Lisp_Object table;
};
+typedef struct Lisp_Char_ID_Table Lisp_Char_ID_Table;
+
+DECLARE_LRECORD (char_id_table, Lisp_Char_ID_Table);
+#define XCHAR_ID_TABLE(x) XRECORD (x, char_id_table, Lisp_Char_ID_Table)
+#define XSETCHAR_ID_TABLE(x, p) XSETRECORD (x, p, char_id_table)
+#define CHAR_ID_TABLE_P(x) RECORDP (x, char_id_table)
+#define GC_CHAR_ID_TABLE_P(x) GC_RECORDP (x, char_id_table)
+/* #define CHECK_CHAR_ID_TABLE(x) CHECK_RECORD (x, char_id_table)
+ char table entries should never escape to Lisp */
-Lisp_Object get_char_code_table (Emchar ch, Lisp_Object table);
+
+Lisp_Object get_char_id_table (Emchar ch, Lisp_Object table);
extern Lisp_Object Vcharset_mojikyo;
int id;
Lisp_Object name;
- Lisp_Object doc_string, registry, short_name, long_name;
+ Lisp_Object doc_string;
+ Lisp_Object registry;
+ Lisp_Object short_name;
+ Lisp_Object long_name;
Lisp_Object reverse_direction_charset;
/* Offset for each byte */
Emchar byte_offset;
};
+typedef struct Lisp_Charset Lisp_Charset;
-DECLARE_LRECORD (charset, struct Lisp_Charset);
-#define XCHARSET(x) XRECORD (x, charset, struct Lisp_Charset)
+DECLARE_LRECORD (charset, Lisp_Charset);
+#define XCHARSET(x) XRECORD (x, charset, Lisp_Charset)
#define XSETCHARSET(x, p) XSETRECORD (x, p, charset)
#define CHARSETP(x) RECORDP (x, charset)
#define GC_CHARSETP(x) GC_RECORDP (x, charset)
/* Table of charsets indexed by type/final-byte/direction. */
Lisp_Object charset_by_attributes[4][128];
+
+ Charset_ID next_allocated_leading_byte;
};
extern struct charset_lookup *chlook;
/* int not Bufbyte even though that is the actual type of a leading byte.
This way, out-ot-range values will get caught rather than automatically
truncated. */
-INLINE Lisp_Object CHARSET_BY_LEADING_BYTE (Charset_ID lb);
-INLINE Lisp_Object
+INLINE_HEADER Lisp_Object CHARSET_BY_LEADING_BYTE (Charset_ID lb);
+INLINE_HEADER Lisp_Object
CHARSET_BY_LEADING_BYTE (Charset_ID lb)
{
assert (lb >= MIN_LEADING_BYTE &&
#define MIN_CHAR_MOJIKYO 0xE00000
#define MIN_CHAR_DAIKANWA MIN_CHAR_MOJIKYO
#define MAX_CHAR_DAIKANWA 0xE0FFFF
-#define MAX_CHAR_MOJIKYO 0xE9093F
+/* #define MAX_CHAR_MOJIKYO 0xE9093F */
+#define MAX_CHAR_MOJIKYO (MIN_CHAR_MOJIKYO + 94 * 60 * 22)
#define MIN_CHAR_94 0xE90940
#define MAX_CHAR_94 (MIN_CHAR_94 + 94 * 80 - 1)
Emchar make_builtin_char (Lisp_Object charset, int c1, int c2);
-INLINE Emchar DECODE_CHAR (Lisp_Object charset, int code_point);
-INLINE Emchar
+INLINE_HEADER Emchar DECODE_CHAR (Lisp_Object charset, int code_point);
+INLINE_HEADER Emchar
DECODE_CHAR (Lisp_Object charset, int code_point)
{
int dim = XCHARSET_DIMENSION (charset);
/* Return a character whose charset is CHARSET and position-codes
are C1 and C2. TYPE9N character ignores C2. */
-INLINE Emchar MAKE_CHAR (Lisp_Object charset, int c1, int c2);
-INLINE Emchar
+INLINE_HEADER Emchar MAKE_CHAR (Lisp_Object charset, int c1, int c2);
+INLINE_HEADER Emchar
MAKE_CHAR (Lisp_Object charset, int c1, int c2)
{
if (XCHARSET_DIMENSION (charset) == 1)
int encode_builtin_char_1 (Emchar c, Lisp_Object* charset);
int range_charset_code_point (Lisp_Object charset, Emchar ch);
-INLINE int charset_code_point (Lisp_Object charset, Emchar ch);
-INLINE int
+INLINE_HEADER int charset_code_point (Lisp_Object charset, Emchar ch);
+INLINE_HEADER int
charset_code_point (Lisp_Object charset, Emchar ch)
{
- Lisp_Object cdef = get_char_code_table (ch, Vcharacter_attribute_table);
+ Lisp_Object cdef = get_char_id_table (ch, Vcharacter_attribute_table);
if (!NILP (cdef))
{
extern Lisp_Object Vdefault_coded_charset_priority_list;
EXFUN (Ffind_charset, 1);
-INLINE int encode_char_1 (Emchar c, Lisp_Object* charset);
-INLINE int
+INLINE_HEADER int encode_char_1 (Emchar c, Lisp_Object* charset);
+INLINE_HEADER int
encode_char_1 (Emchar c, Lisp_Object* charset)
{
- Lisp_Object cdef = get_char_code_table (c, Vcharacter_attribute_table);
+ Lisp_Object cdef = get_char_id_table (c, Vcharacter_attribute_table);
if (!EQ (cdef, Qnil))
{
return encode_builtin_char_1 (c, charset);
}
-INLINE int encode_char_2 (Emchar ch, Lisp_Object* charset);
-INLINE int
+INLINE_HEADER int encode_char_2 (Emchar ch, Lisp_Object* charset);
+INLINE_HEADER int
encode_char_2 (Emchar ch, Lisp_Object* charset)
{
int code_point = encode_char_1 (ch, charset);
#define ENCODE_CHAR(ch, charset) encode_char_2 (ch, &(charset))
-INLINE void breakup_char_1 (Emchar c, Lisp_Object *charset, int *c1, int *c2);
-INLINE void
+INLINE_HEADER void
+breakup_char_1 (Emchar c, Lisp_Object *charset, int *c1, int *c2);
+INLINE_HEADER void
breakup_char_1 (Emchar c, Lisp_Object *charset, int *c1, int *c2)
{
int code_point = encode_char_2 (c, charset);
#define BREAKUP_CHAR(ch, charset, b1, b2) \
breakup_char_1 (ch, &(charset), &(b1), &(b2))
-INLINE Lisp_Object CHAR_CHARSET (Emchar ch);
-INLINE Lisp_Object
+INLINE_HEADER Lisp_Object CHAR_CHARSET (Emchar ch);
+INLINE_HEADER Lisp_Object
CHAR_CHARSET (Emchar ch)
{
Lisp_Object charset;
extern Lisp_Object Vcharset_japanese_jisx0208;
extern Lisp_Object Vcharset_japanese_jisx0212;
-#endif /* _XEMACS_CHAR_UCS_H */
+#endif /* INCLUDED_char_ucs_h_ */