From: tomo Date: Tue, 14 Sep 1999 06:03:57 +0000 (+0000) Subject: (breakup_char_1): Use `Vdefault_coded_charset_priority_list' for X-Git-Tag: r21-2-19-utf-2000-0_7-0~3 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=aa5b3d9f401a1e96e261cd3c60997544a8c87e1d;p=chise%2Fxemacs-chise.git (breakup_char_1): Use `Vdefault_coded_charset_priority_list' for hebrew-iso8859-8, thai-tis620 and katakana-jisx0201 area. --- diff --git a/src/char-ucs.h b/src/char-ucs.h index 10ab6f1..56b72bf 100644 --- a/src/char-ucs.h +++ b/src/char-ucs.h @@ -416,7 +416,7 @@ 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) { - if (c < MIN_CHAR_HEBREW) + if (c < MIN_CHAR_94) { Lisp_Object charsets = Vdefault_coded_charset_priority_list; while (!EQ (charsets, Qnil)) @@ -430,7 +430,7 @@ breakup_char_1 (Emchar c, Lisp_Object *charset, int *c1, int *c2) } charsets = Fcdr (charsets); } - /* otherwise */ + /* otherwise --- maybe for bootstrap */ if (c <= MAX_CHAR_BASIC_LATIN) { *charset = Vcharset_ascii; @@ -461,6 +461,25 @@ breakup_char_1 (Emchar c, Lisp_Object *charset, int *c1, int *c2) *c1 = c - MIN_CHAR_CYRILLIC + 0x20; *c2 = 0; } + else if ((MIN_CHAR_HEBREW <= c) && (c <= MAX_CHAR_HEBREW)) + { + *charset = Vcharset_hebrew_iso8859_8; + *c1 = c - MIN_CHAR_HEBREW + 0x20; + *c2 = 0; + } + else if ((MIN_CHAR_THAI <= c) && (c <= MAX_CHAR_THAI)) + { + *charset = Vcharset_thai_tis620; + *c1 = c - MIN_CHAR_THAI + 0x20; + *c2 = 0; + } + else if ((MIN_CHAR_HALFWIDTH_KATAKANA <= c) + && (c <= MAX_CHAR_HALFWIDTH_KATAKANA)) + { + *charset = Vcharset_katakana_jisx0201; + *c1 = c - MIN_CHAR_HALFWIDTH_KATAKANA + 0x20; + *c2 = 0; + } else { *charset = Vcharset_ucs_bmp; @@ -468,49 +487,6 @@ breakup_char_1 (Emchar c, Lisp_Object *charset, int *c1, int *c2) *c2 = c & 0xff; } } - else if (c <= MAX_CHAR_HEBREW) - { - *charset = Vcharset_hebrew_iso8859_8; - *c1 = c - MIN_CHAR_HEBREW + 0x20; - *c2 = 0; - } - else if (c < MIN_CHAR_THAI) - { - *charset = Vcharset_ucs_bmp; - *c1 = c >> 8; - *c2 = c & 0xff; - } - else if (c <= MAX_CHAR_THAI) - { - *charset = Vcharset_thai_tis620; - *c1 = c - MIN_CHAR_THAI + 0x20; - *c2 = 0; - } - else if (c < MIN_CHAR_HALFWIDTH_KATAKANA) - { - 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); - } - /* otherwise */ - *charset = Vcharset_ucs_bmp; - *c1 = c >> 8; - *c2 = c & 0xff; - } - else if (c <= MAX_CHAR_HALFWIDTH_KATAKANA) - { - *charset = Vcharset_katakana_jisx0201; - *c1 = c - MIN_CHAR_HALFWIDTH_KATAKANA + 0x20; - *c2 = 0; - } else if (c <= MAX_CHAR_94) { *charset