From: tomo Date: Thu, 28 Oct 1999 09:01:48 +0000 (+0000) Subject: (range_charset_code_point): New interface. X-Git-Tag: r21-2-19-utf-2000-0_10-0~12 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=fc5c1e9c0757a077f2b8556bfa747d75e937d44d;p=chise%2Fxemacs-chise.git.1 (range_charset_code_point): New interface. (breakup_char_1): Use `range_charset_code_point'. --- diff --git a/src/char-ucs.h b/src/char-ucs.h index 3fa8271..471158b 100644 --- a/src/char-ucs.h +++ b/src/char-ucs.h @@ -470,6 +470,8 @@ MAKE_CHAR (Lisp_Object charset, int c1, int c2) extern Lisp_Object Vcharacter_attribute_table; +Lisp_Object range_charset_code_point (Lisp_Object charset, Emchar ch); + unsigned char charset_get_byte1 (Lisp_Object charset, Emchar ch); unsigned char charset_get_byte2 (Lisp_Object charset, Emchar ch); @@ -492,7 +494,8 @@ breakup_char_1 (Emchar c, Lisp_Object *charset, int *c1, int *c2) *charset = Ffind_charset (Fcar (charsets)); if (!EQ (*charset, Qnil)) { - if (!EQ (field = Fcdr (Fassq (*charset, cdef)), Qnil)) + if (!EQ (field = Fcdr (Fassq (*charset, cdef)), Qnil) || + !EQ (field = range_charset_code_point (*charset, c), Qnil)) { Lisp_Object ret = Fcar (field); if (INTP (ret)) @@ -503,32 +506,14 @@ breakup_char_1 (Emchar c, Lisp_Object *charset, int *c1, int *c2) return; } } - else if ((*c1 = charset_get_byte1 (*charset, c))) - { - *c2 = charset_get_byte2 (*charset, c); - return; - } } charsets = Fcdr (charsets); } } + + /* otherwise --- maybe for bootstrap */ if (c < MIN_CHAR_OBS_94x94) { -#if 0 - Lisp_Object charsets = Vdefault_coded_charset_priority_list; - while (!EQ (charsets, Qnil)) - { - *charset = Ffind_charset (Fcar (charsets)); - if (!EQ (*charset, Qnil) - && (*c1 = charset_get_byte1 (*charset, c)) ) - { - *c2 = charset_get_byte2 (*charset, c); - return; - } - charsets = Fcdr (charsets); - } -#endif - /* otherwise --- maybe for bootstrap */ if (c <= MAX_CHAR_BASIC_LATIN) { *charset = Vcharset_ascii;