From: tomo Date: Thu, 27 Jan 2000 04:44:48 +0000 (+0000) Subject: (charset_code_point): Moved from mule-charset.c. X-Git-Tag: r21-2-27-utf-2000-0_14-0~19 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=0affd9df95460dee6d45c2d7cad768cbff622c36;p=chise%2Fxemacs-chise.git.1 (charset_code_point): Moved from mule-charset.c. (ENCODE_CHAR): New macro. --- 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)