From fc5c1e9c0757a077f2b8556bfa747d75e937d44d Mon Sep 17 00:00:00 2001 From: tomo Date: Thu, 28 Oct 1999 09:01:48 +0000 Subject: [PATCH] (range_charset_code_point): New interface. (breakup_char_1): Use `range_charset_code_point'. --- src/char-ucs.h | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) 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; -- 1.7.10.4