Mercurial > hg > xemacs-beta
diff src/chartab.c @ 440:8de8e3f6228a r21-2-28
Import from CVS: tag r21-2-28
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:33:38 +0200 |
parents | 3ecd8885ac67 |
children | abe6d1db359e |
line wrap: on
line diff
--- a/src/chartab.c Mon Aug 13 11:32:27 2007 +0200 +++ b/src/chartab.c Mon Aug 13 11:33:38 2007 +0200 @@ -97,7 +97,7 @@ static Lisp_Object mark_char_table_entry (Lisp_Object obj) { - struct Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (obj); + Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (obj); int i; for (i = 0; i < 96; i++) @@ -110,8 +110,8 @@ static int char_table_entry_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) { - struct Lisp_Char_Table_Entry *cte1 = XCHAR_TABLE_ENTRY (obj1); - struct Lisp_Char_Table_Entry *cte2 = XCHAR_TABLE_ENTRY (obj2); + Lisp_Char_Table_Entry *cte1 = XCHAR_TABLE_ENTRY (obj1); + Lisp_Char_Table_Entry *cte2 = XCHAR_TABLE_ENTRY (obj2); int i; for (i = 0; i < 96; i++) @@ -124,13 +124,13 @@ static unsigned long char_table_entry_hash (Lisp_Object obj, int depth) { - struct Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (obj); + Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (obj); return internal_array_hash (cte->level2, 96, depth); } static const struct lrecord_description char_table_entry_description[] = { - { XD_LISP_OBJECT, offsetof(struct Lisp_Char_Table_Entry, level2), 96 }, + { XD_LISP_OBJECT_ARRAY, offsetof (Lisp_Char_Table_Entry, level2), 96 }, { XD_END } }; @@ -139,13 +139,13 @@ 0, char_table_entry_equal, char_table_entry_hash, char_table_entry_description, - struct Lisp_Char_Table_Entry); + Lisp_Char_Table_Entry); #endif /* MULE */ static Lisp_Object mark_char_table (Lisp_Object obj) { - struct Lisp_Char_Table *ct = XCHAR_TABLE (obj); + Lisp_Char_Table *ct = XCHAR_TABLE (obj); int i; for (i = 0; i < NUM_ASCII_CHARS; i++) @@ -241,7 +241,7 @@ static void print_chartab_charset_row (Lisp_Object charset, int row, - struct Lisp_Char_Table_Entry *cte, + Lisp_Char_Table_Entry *cte, Lisp_Object printcharfun) { int i; @@ -289,7 +289,7 @@ static void print_chartab_two_byte_charset (Lisp_Object charset, - struct Lisp_Char_Table_Entry *cte, + Lisp_Char_Table_Entry *cte, Lisp_Object printcharfun) { int i; @@ -319,7 +319,7 @@ static void print_char_table (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) { - struct Lisp_Char_Table *ct = XCHAR_TABLE (obj); + Lisp_Char_Table *ct = XCHAR_TABLE (obj); char buf[200]; sprintf (buf, "#s(char-table type %s data (", @@ -377,7 +377,7 @@ } else { - struct Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (ann); + Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (ann); if (XCHARSET_DIMENSION (charset) == 1) print_chartab_charset_row (charset, -1, cte, printcharfun); else @@ -393,8 +393,8 @@ static int char_table_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) { - struct Lisp_Char_Table *ct1 = XCHAR_TABLE (obj1); - struct Lisp_Char_Table *ct2 = XCHAR_TABLE (obj2); + Lisp_Char_Table *ct1 = XCHAR_TABLE (obj1); + Lisp_Char_Table *ct2 = XCHAR_TABLE (obj2); int i; if (CHAR_TABLE_TYPE (ct1) != CHAR_TABLE_TYPE (ct2)) @@ -416,7 +416,7 @@ static unsigned long char_table_hash (Lisp_Object obj, int depth) { - struct Lisp_Char_Table *ct = XCHAR_TABLE (obj); + Lisp_Char_Table *ct = XCHAR_TABLE (obj); unsigned long hashval = internal_array_hash (ct->ascii, NUM_ASCII_CHARS, depth); #ifdef MULE @@ -427,12 +427,12 @@ } static const struct lrecord_description char_table_description[] = { - { XD_LISP_OBJECT, offsetof(struct Lisp_Char_Table, ascii), NUM_ASCII_CHARS }, + { XD_LISP_OBJECT_ARRAY, offsetof (Lisp_Char_Table, ascii), NUM_ASCII_CHARS }, #ifdef MULE - { XD_LISP_OBJECT, offsetof(struct Lisp_Char_Table, level1), NUM_LEADING_BYTES }, + { XD_LISP_OBJECT_ARRAY, offsetof (Lisp_Char_Table, level1), NUM_LEADING_BYTES }, #endif - { XD_LISP_OBJECT, offsetof(struct Lisp_Char_Table, mirror_table), 1 }, - { XD_LO_LINK, offsetof(struct Lisp_Char_Table, next_table) }, + { XD_LISP_OBJECT, offsetof (Lisp_Char_Table, mirror_table) }, + { XD_LO_LINK, offsetof (Lisp_Char_Table, next_table) }, { XD_END } }; @@ -440,7 +440,7 @@ mark_char_table, print_char_table, 0, char_table_equal, char_table_hash, char_table_description, - struct Lisp_Char_Table); + Lisp_Char_Table); DEFUN ("char-table-p", Fchar_table_p, 1, 1, 0, /* Return non-nil if OBJECT is a char table. @@ -543,7 +543,7 @@ } void -fill_char_table (struct Lisp_Char_Table *ct, Lisp_Object value) +fill_char_table (Lisp_Char_Table *ct, Lisp_Object value) { int i; @@ -563,7 +563,7 @@ */ (table)) { - struct Lisp_Char_Table *ct; + Lisp_Char_Table *ct; CHECK_CHAR_TABLE (table); ct = XCHAR_TABLE (table); @@ -599,11 +599,11 @@ */ (type)) { - struct Lisp_Char_Table *ct; + Lisp_Char_Table *ct; Lisp_Object obj; enum char_table_type ty = symbol_to_char_table_type (type); - ct = alloc_lcrecord_type (struct Lisp_Char_Table, &lrecord_char_table); + ct = alloc_lcrecord_type (Lisp_Char_Table, &lrecord_char_table); ct->type = ty; if (ty == CHAR_TABLE_TYPE_SYNTAX) { @@ -631,9 +631,8 @@ { Lisp_Object obj; int i; - struct Lisp_Char_Table_Entry *cte = - alloc_lcrecord_type (struct Lisp_Char_Table_Entry, - &lrecord_char_table_entry); + Lisp_Char_Table_Entry *cte = + alloc_lcrecord_type (Lisp_Char_Table_Entry, &lrecord_char_table_entry); for (i = 0; i < 96; i++) cte->level2[i] = initval; @@ -645,12 +644,11 @@ static Lisp_Object copy_char_table_entry (Lisp_Object entry) { - struct Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (entry); + Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (entry); Lisp_Object obj; int i; - struct Lisp_Char_Table_Entry *ctenew = - alloc_lcrecord_type (struct Lisp_Char_Table_Entry, - &lrecord_char_table_entry); + Lisp_Char_Table_Entry *ctenew = + alloc_lcrecord_type (Lisp_Char_Table_Entry, &lrecord_char_table_entry); for (i = 0; i < 96; i++) { @@ -674,13 +672,13 @@ */ (old_table)) { - struct Lisp_Char_Table *ct, *ctnew; + Lisp_Char_Table *ct, *ctnew; Lisp_Object obj; int i; CHECK_CHAR_TABLE (old_table); ct = XCHAR_TABLE (old_table); - ctnew = alloc_lcrecord_type (struct Lisp_Char_Table, &lrecord_char_table); + ctnew = alloc_lcrecord_type (Lisp_Char_Table, &lrecord_char_table); ctnew->type = ct->type; for (i = 0; i < NUM_ASCII_CHARS; i++) @@ -735,7 +733,7 @@ #else /* MULE */ else if (VECTORP (range)) { - struct Lisp_Vector *vec = XVECTOR (range); + Lisp_Vector *vec = XVECTOR (range); Lisp_Object *elts = vector_data (vec); if (vector_length (vec) != 2) signal_simple_error ("Length of charset row vector must be 2", @@ -775,7 +773,7 @@ /* called from CHAR_TABLE_VALUE(). */ Lisp_Object -get_non_ascii_char_table_value (struct Lisp_Char_Table *ct, int leading_byte, +get_non_ascii_char_table_value (Lisp_Char_Table *ct, int leading_byte, Emchar c) { Lisp_Object val; @@ -786,7 +784,7 @@ val = ct->level1[leading_byte - MIN_LEADING_BYTE]; if (CHAR_TABLE_ENTRYP (val)) { - struct Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (val); + Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (val); val = cte->level2[byte1 - 32]; if (CHAR_TABLE_ENTRYP (val)) { @@ -803,7 +801,7 @@ #endif /* MULE */ Lisp_Object -get_char_table (Emchar ch, struct Lisp_Char_Table *ct) +get_char_table (Emchar ch, Lisp_Char_Table *ct) { #ifdef MULE { @@ -823,7 +821,7 @@ val = ct->level1[lb]; if (CHAR_TABLE_ENTRYP (val)) { - struct Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (val); + Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (val); val = cte->level2[byte1 - 32]; if (CHAR_TABLE_ENTRYP (val)) { @@ -848,7 +846,7 @@ */ (ch, table)) { - struct Lisp_Char_Table *ct; + Lisp_Char_Table *ct; CHECK_CHAR_TABLE (table); ct = XCHAR_TABLE (table); @@ -863,7 +861,7 @@ */ (range, table, multi)) { - struct Lisp_Char_Table *ct; + Lisp_Char_Table *ct; struct chartab_range rainj; if (CHAR_OR_CHAR_INTP (range)) @@ -1048,7 +1046,7 @@ /* Assign VAL to all characters in RANGE in char table CT. */ void -put_char_table (struct Lisp_Char_Table *ct, struct chartab_range *range, +put_char_table (Lisp_Char_Table *ct, struct chartab_range *range, Lisp_Object val) { switch (range->type) @@ -1081,7 +1079,7 @@ case CHARTAB_RANGE_ROW: { - struct Lisp_Char_Table_Entry *cte; + Lisp_Char_Table_Entry *cte; int lb = XCHARSET_LEADING_BYTE (range->charset) - MIN_LEADING_BYTE; /* make sure that there is a separate entry for the row. */ if (!CHAR_TABLE_ENTRYP (ct->level1[lb])) @@ -1105,7 +1103,7 @@ ct->ascii[byte1 + 128] = val; else { - struct Lisp_Char_Table_Entry *cte; + Lisp_Char_Table_Entry *cte; int lb = XCHARSET_LEADING_BYTE (charset) - MIN_LEADING_BYTE; /* make sure that there is a separate entry for the row. */ if (!CHAR_TABLE_ENTRYP (ct->level1[lb])) @@ -1156,7 +1154,7 @@ */ (range, val, table)) { - struct Lisp_Char_Table *ct; + Lisp_Char_Table *ct; struct chartab_range rainj; CHECK_CHAR_TABLE (table); @@ -1171,7 +1169,7 @@ /* Map FN over the ASCII chars in CT. */ static int -map_over_charset_ascii (struct Lisp_Char_Table *ct, +map_over_charset_ascii (Lisp_Char_Table *ct, int (*fn) (struct chartab_range *range, Lisp_Object val, void *arg), void *arg) @@ -1201,7 +1199,7 @@ /* Map FN over the Control-1 chars in CT. */ static int -map_over_charset_control_1 (struct Lisp_Char_Table *ct, +map_over_charset_control_1 (Lisp_Char_Table *ct, int (*fn) (struct chartab_range *range, Lisp_Object val, void *arg), void *arg) @@ -1227,7 +1225,7 @@ CTE specifies the char table entry for CHARSET. */ static int -map_over_charset_row (struct Lisp_Char_Table_Entry *cte, +map_over_charset_row (Lisp_Char_Table_Entry *cte, Lisp_Object charset, int row, int (*fn) (struct chartab_range *range, Lisp_Object val, void *arg), @@ -1267,7 +1265,7 @@ static int -map_over_other_charset (struct Lisp_Char_Table *ct, int lb, +map_over_other_charset (Lisp_Char_Table *ct, int lb, int (*fn) (struct chartab_range *range, Lisp_Object val, void *arg), void *arg) @@ -1290,7 +1288,7 @@ } { - struct Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (val); + Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (val); int charset94_p = (XCHARSET_CHARS (charset) == 94); int start = charset94_p ? 33 : 32; int stop = charset94_p ? 127 : 128; @@ -1324,7 +1322,7 @@ becomes the return value of map_char_table(). */ int -map_char_table (struct Lisp_Char_Table *ct, +map_char_table (Lisp_Char_Table *ct, struct chartab_range *range, int (*fn) (struct chartab_range *range, Lisp_Object val, void *arg), @@ -1451,7 +1449,7 @@ */ (function, table, range)) { - struct Lisp_Char_Table *ct; + Lisp_Char_Table *ct; struct slow_map_char_table_arg slarg; struct gcpro gcpro1, gcpro2; struct chartab_range rainj; @@ -1619,7 +1617,7 @@ unsigned int designator, unsigned int not) { REGISTER Lisp_Object temp; - struct Lisp_Char_Table *ctbl; + Lisp_Char_Table *ctbl; #ifdef ERROR_CHECK_TYPECHECK if (NILP (Fcategory_table_p (table))) signal_simple_error ("Expected category table", table);