From 0affd9df95460dee6d45c2d7cad768cbff622c36 Mon Sep 17 00:00:00 2001 From: tomo Date: Thu, 27 Jan 2000 04:44:48 +0000 Subject: [PATCH] (charset_code_point): Moved from mule-charset.c. (ENCODE_CHAR): New macro. --- src/char-ucs.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/char-ucs.h b/src/char-ucs.h index 0626bfc..91ab5dd 100644 --- a/src/char-ucs.h +++ b/src/char-ucs.h @@ -514,7 +514,22 @@ extern Lisp_Object Vcharacter_attribute_table; int encode_builtin_char_1 (Emchar c, Lisp_Object* charset); int range_charset_code_point (Lisp_Object charset, Emchar ch); -int charset_code_point (Lisp_Object charset, Emchar ch); + +INLINE int charset_code_point (Lisp_Object charset, Emchar ch); +INLINE int +charset_code_point (Lisp_Object charset, Emchar ch) +{ + Lisp_Object cdef = get_char_code_table (ch, Vcharacter_attribute_table); + + if (!NILP (cdef)) + { + Lisp_Object field = Fassq (charset, cdef); + + if (!NILP (field)) + return XINT (Fcdr (field)); + } + return range_charset_code_point (charset, ch); +} extern Lisp_Object Vdefault_coded_charset_priority_list; EXFUN (Ffind_charset, 1); @@ -551,6 +566,8 @@ encode_char_1 (Emchar c, Lisp_Object* charset) return encode_builtin_char_1 (c, charset); } +#define ENCODE_CHAR(ch, charset) encode_char_1 (ch, &(charset)) + INLINE void breakup_char_1 (Emchar c, Lisp_Object *charset, int *c1, int *c2); INLINE void breakup_char_1 (Emchar c, Lisp_Object *charset, int *c1, int *c2) -- 1.7.10.4