From: tomo Date: Mon, 27 Sep 1999 14:57:08 +0000 (+0000) Subject: (struct Lisp_Charset): Change type of `decoding_table' from X-Git-Tag: r21-2-19-utf-2000-0_8-2~29 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=52bd10173df152d27436b57ebd3c1e3eb1e1cc0c;p=chise%2Fxemacs-chise.git.1 (struct Lisp_Charset): Change type of `decoding_table' from to . (MAKE_CHAR): Modify for new specification of `decoding_table'. --- diff --git a/src/char-ucs.h b/src/char-ucs.h index c683770..28e5f5a 100644 --- a/src/char-ucs.h +++ b/src/char-ucs.h @@ -216,7 +216,7 @@ struct Lisp_Charset unsigned int graphic; /* Byte->character mapping table */ - Emchar* decoding_table; + Lisp_Object decoding_table; /* Character->byte mapping table */ Emchar_to_byte_table* to_byte1_table; @@ -361,10 +361,15 @@ INLINE Emchar MAKE_CHAR (Lisp_Object charset, int c1, int c2); INLINE Emchar MAKE_CHAR (Lisp_Object charset, int c1, int c2) { - Emchar* decoding_table; - - if ((decoding_table = XCHARSET_DECODING_TABLE (charset)) != NULL) - return decoding_table[c1 - (XCHARSET_CHARS (charset) == 94 ? 33 : 32)]; + Lisp_Object decoding_table = XCHARSET_DECODING_TABLE (charset); + int idx; + Lisp_Object ch; + + if (!EQ(decoding_table, Qnil) + && (0 <= (idx = c1 - (XCHARSET_CHARS (charset) == 94 ? 33 : 32))) + && (idx < XVECTOR_LENGTH (decoding_table)) + && !EQ (ch = XVECTOR_DATA(decoding_table)[idx], Qnil)) + return XCHAR (ch); else if (EQ (charset, Vcharset_katakana_jisx0201)) if (c1 < 0x60) return c1 + MIN_CHAR_HALFWIDTH_KATAKANA - 33;