From: tomo Date: Tue, 12 Feb 2002 15:36:38 +0000 (+0000) Subject: (load_char_decoding_entry_maybe): New prototype when `HAVE_DATABASE' X-Git-Tag: r21-2-44-lazy-n7c~119 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=68f81153e99246014354f8d58ab81bb9fd1ce786;p=chise%2Fxemacs-chise.git.1 (load_char_decoding_entry_maybe): New prototype when `HAVE_DATABASE' is defined. (DECODE_DEFINED_CHAR): Use `load_char_decoding_entry_maybe' when `HAVE_DATABASE' is defined. --- diff --git a/src/char-ucs.h b/src/char-ucs.h index 0d9e1eb..0fb5e06 100644 --- a/src/char-ucs.h +++ b/src/char-ucs.h @@ -659,6 +659,10 @@ decoding_table_remove_char (Lisp_Object ccs, int code_point) decoding_table_put_char (ccs, code_point, Qunbound); } +#ifdef HAVE_DATABASE +Emchar load_char_decoding_entry_maybe (Lisp_Object ccs, int code_point); +#endif + INLINE_HEADER Emchar DECODE_DEFINED_CHAR (Lisp_Object charset, int code_point); INLINE_HEADER Emchar @@ -676,6 +680,17 @@ DECODE_DEFINED_CHAR (Lisp_Object ccs, int code_point) } if (CHARP (decoding_table)) return XCHAR (decoding_table); +#ifdef HAVE_DATABASE + if (EQ (decoding_table, Qunloaded) || + EQ (decoding_table, Qunbound) || + NILP (decoding_table) ) + { + if (XCHARSET_GRAPHIC (ccs) == 1) + return load_char_decoding_entry_maybe (ccs, code_point & 0x7F7F7F7F); + else + return load_char_decoding_entry_maybe (ccs, code_point); + } +#endif else return -1; }