From: tomo Date: Sun, 3 Oct 1999 14:25:47 +0000 (+0000) Subject: (MAKE_CHAR): Allow nested decoding-table. X-Git-Tag: r21-2-19-utf-2000-0_8-2~19 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=cb73cc7f011b2a258697b9a5f370aaa5c3c4e235;p=chise%2Fxemacs-chise.git.1 (MAKE_CHAR): Allow nested decoding-table. --- diff --git a/src/char-ucs.h b/src/char-ucs.h index 42d98ef..abfb6f8 100644 --- a/src/char-ucs.h +++ b/src/char-ucs.h @@ -378,15 +378,26 @@ INLINE Emchar MAKE_CHAR (Lisp_Object charset, int c1, int c2) { Lisp_Object decoding_table = XCHARSET_DECODING_TABLE (charset); - int idx; + int ofs, idx; Lisp_Object ch; if (!EQ (decoding_table, Qnil) - && (0 <= (idx = c1 - (XCHARSET_CHARS (charset) == 94 ? 33 : 32))) + && (0 <= (idx = + c1 - (ofs = (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 (VECTORP (ch)) + { + if ((0 <= (idx = c2 - ofs)) + && (idx < XVECTOR_LENGTH (ch)) + && !EQ (ch = XVECTOR_DATA(ch)[idx], Qnil)) + return XCHAR (ch); + } + else + return XCHAR (ch); + } + if (EQ (charset, Vcharset_katakana_jisx0201)) if (c1 < 0x60) return c1 + MIN_CHAR_HALFWIDTH_KATAKANA - 33; else