From 68f81153e99246014354f8d58ab81bb9fd1ce786 Mon Sep 17 00:00:00 2001 From: tomo Date: Tue, 12 Feb 2002 15:36:38 +0000 Subject: [PATCH] (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. --- src/char-ucs.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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; } -- 1.7.10.4