From: tomo Date: Mon, 3 Sep 2001 04:37:06 +0000 (+0000) Subject: (struct Lisp_Char_ID_Table): Deleted. X-Git-Tag: r21-2-41-chartab-2~21 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=7d351dac9dd282ddd82134a825f122d7861f3bf7;p=chise%2Fxemacs-chise.git- (struct Lisp_Char_ID_Table): Deleted. (char_id_table): Likewise. (GC_CHAR_ID_TABLE_P): Likewise. (Lisp_Char_ID_Table): Use structure `Lisp_Char_Table'. (XCHAR_ID_TABLE): Use `XCHAR_TABLE'. (XSETCHAR_ID_TABLE): Use `XSETCHAR_TABLE'. (CHAR_ID_TABLE_P): Use `CHAR_TABLEP'. (get_char_id_table): Use `Lisp_Char_Table' instead of `Lisp_Char_ID_Table'. (put_char_id_table_0): Likewise. (put_char_id_table): Likewise. --- diff --git a/src/chartab.h b/src/chartab.h index 773ed3a..0b95e5c 100644 --- a/src/chartab.h +++ b/src/chartab.h @@ -1,6 +1,7 @@ /* Declarations having to do with Mule char tables. Copyright (C) 1992 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. + Copyright (C) 1999,2000,2001 MORIOKA Tomohiko This file is part of XEmacs. @@ -31,7 +32,7 @@ Boston, MA 02111-1307, USA. */ #ifdef UTF2000 /************************************************************************/ -/* Char-ID Tables */ +/* Char-ID Tables */ /************************************************************************/ struct Lisp_Uint8_Byte_Table @@ -92,49 +93,13 @@ Lisp_Object put_byte_table (Lisp_Object table, unsigned char idx, Lisp_Object value); -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 */ +typedef struct Lisp_Char_Table Lisp_Char_ID_Table; +#define XCHAR_ID_TABLE(x) XCHAR_TABLE(x) +#define XSETCHAR_ID_TABLE(x, p) XSETCHAR_TABLE(x, p) +#define CHAR_ID_TABLE_P(x) CHAR_TABLEP(x) Lisp_Object make_char_id_table (Lisp_Object initval); -Lisp_Object get_char_id_table (Lisp_Char_ID_Table* cit, Emchar ch); - -INLINE_HEADER void -put_char_id_table_0 (Lisp_Char_ID_Table* cit, Emchar code, Lisp_Object value); -INLINE_HEADER void -put_char_id_table_0 (Lisp_Char_ID_Table* cit, Emchar code, Lisp_Object value) -{ - Lisp_Object table1, table2, table3, table4; - - table1 = cit->table; - table2 = get_byte_table (table1, (unsigned char)(code >> 24)); - table3 = get_byte_table (table2, (unsigned char)(code >> 16)); - table4 = get_byte_table (table3, (unsigned char)(code >> 8)); - - table4 = put_byte_table (table4, (unsigned char) code, value); - table3 = put_byte_table (table3, (unsigned char)(code >> 8), table4); - table2 = put_byte_table (table2, (unsigned char)(code >> 16), table3); - cit->table = put_byte_table (table1, (unsigned char)(code >> 24), table2); -} - -void put_char_id_table (Lisp_Char_ID_Table* table, - Lisp_Object character, Lisp_Object value); - -EXFUN (Fget_char_attribute, 3); - #endif @@ -336,6 +301,35 @@ EXFUN (Fget_char_table, 2); extern Lisp_Object Vall_syntax_tables; +#ifdef UTF2000 + +Lisp_Object get_char_id_table (Lisp_Char_Table* cit, Emchar ch); + +INLINE_HEADER void +put_char_id_table_0 (Lisp_Char_Table* cit, Emchar code, Lisp_Object value); +INLINE_HEADER void +put_char_id_table_0 (Lisp_Char_Table* cit, Emchar code, Lisp_Object value) +{ + Lisp_Object table1, table2, table3, table4; + + table1 = cit->table; + table2 = get_byte_table (table1, (unsigned char)(code >> 24)); + table3 = get_byte_table (table2, (unsigned char)(code >> 16)); + table4 = get_byte_table (table3, (unsigned char)(code >> 8)); + + table4 = put_byte_table (table4, (unsigned char) code, value); + table3 = put_byte_table (table3, (unsigned char)(code >> 8), table4); + table2 = put_byte_table (table2, (unsigned char)(code >> 16), table3); + cit->table = put_byte_table (table1, (unsigned char)(code >> 24), table2); +} + +void put_char_id_table (Lisp_Char_Table* table, + Lisp_Object character, Lisp_Object value); + +EXFUN (Fget_char_attribute, 3); + +#endif + #ifdef MULE int check_category_char(Emchar ch, Lisp_Object ctbl,