From: tomo Date: Fri, 29 Oct 1999 03:51:28 +0000 (+0000) Subject: (charset_get_byte1): Deleted. X-Git-Tag: r21-2-19-utf-2000-0_10-0~8 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ad9899c500e90d43b534a0c67d13b10bb3ddfb6;p=chise%2Fxemacs-chise.git (charset_get_byte1): Deleted. (charset_get_byte2): Deleted. --- diff --git a/src/char-ucs.h b/src/char-ucs.h index 2637fa7..b85c78a 100644 --- a/src/char-ucs.h +++ b/src/char-ucs.h @@ -472,9 +472,6 @@ 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); - extern Lisp_Object Vdefault_coded_charset_priority_list; EXFUN (Ffind_charset, 1); diff --git a/src/mule-charset.c b/src/mule-charset.c index 791056d..ab8c190 100644 --- a/src/mule-charset.c +++ b/src/mule-charset.c @@ -1081,143 +1081,6 @@ charset_code_point (Lisp_Object charset, Emchar ch) return range_charset_code_point (charset, ch); } -unsigned char -charset_get_byte1 (Lisp_Object charset, Emchar ch) -{ - Lisp_Object table; - int d; - - if (!EQ (table = XCHARSET_ENCODING_TABLE (charset), Qnil)) - { - Lisp_Object value = get_char_code_table (ch, table); - - if (INTP (value)) - { - Emchar code = XINT (value); - - if (code < (1 << 8)) - return code; - else if (code < (1 << 16)) - return code >> 8; - else if (code < (1 << 24)) - return code >> 16; - else - return code >> 24; - } - } - if ((XCHARSET_UCS_MIN (charset) <= ch) - && (ch <= XCHARSET_UCS_MAX (charset))) - return (ch - XCHARSET_UCS_MIN (charset) - + XCHARSET_CODE_OFFSET (charset)) - / (XCHARSET_DIMENSION (charset) == 1 ? - 1 - : - XCHARSET_DIMENSION (charset) == 2 ? - XCHARSET_CHARS (charset) - : - XCHARSET_DIMENSION (charset) == 3 ? - XCHARSET_CHARS (charset) * XCHARSET_CHARS (charset) - : - XCHARSET_CHARS (charset) - * XCHARSET_CHARS (charset) * XCHARSET_CHARS (charset)) - + XCHARSET_BYTE_OFFSET (charset); - else if (XCHARSET_CODE_OFFSET (charset) == 0) - { - if (XCHARSET_DIMENSION (charset) == 1) - { - if (XCHARSET_CHARS (charset) == 94) - { - if (((d = ch - (MIN_CHAR_94 - + (XCHARSET_FINAL (charset) - '0') * 94)) >= 0) - && (d < 94)) - return d + 33; - } - else if (XCHARSET_CHARS (charset) == 96) - { - if (((d = ch - (MIN_CHAR_96 - + (XCHARSET_FINAL (charset) - '0') * 96)) >= 0) - && (d < 96)) - return d + 32; - } - else - return 0; - } - else if (XCHARSET_DIMENSION (charset) == 2) - { - if (XCHARSET_CHARS (charset) == 94) - { - if (((d = ch - (MIN_CHAR_94x94 - + (XCHARSET_FINAL (charset) - '0') * 94 * 94)) - >= 0) - && (d < 94 * 94)) - return (d / 94) + 33; - } - else if (XCHARSET_CHARS (charset) == 96) - { - if (((d = ch - (MIN_CHAR_96x96 - + (XCHARSET_FINAL (charset) - '0') * 96 * 96)) - >= 0) - && (d < 96 * 96)) - return (d / 96) + 32; - } - } - } - return 0; -} - -unsigned char -charset_get_byte2 (Lisp_Object charset, Emchar ch) -{ - if (XCHARSET_DIMENSION (charset) == 1) - return 0; - else - { - Lisp_Object table; - - if (!EQ (table = XCHARSET_ENCODING_TABLE (charset), Qnil)) - { - Lisp_Object value = get_char_code_table (ch, table); - - if (INTP (value)) - { - Emchar code = XINT (value); - - if (code < (1 << 16)) - return (unsigned char)code; - else if (code < (1 << 24)) - return (unsigned char)(code >> 16); - else - return (unsigned char)(code >> 24); - } - } - if ((XCHARSET_UCS_MIN (charset) <= ch) - && (ch <= XCHARSET_UCS_MAX (charset))) - return ((ch - XCHARSET_UCS_MIN (charset) - + XCHARSET_CODE_OFFSET (charset)) - / (XCHARSET_DIMENSION (charset) == 2 ? - 1 - : - XCHARSET_DIMENSION (charset) == 3 ? - XCHARSET_CHARS (charset) - : - XCHARSET_CHARS (charset) * XCHARSET_CHARS (charset))) - % XCHARSET_CHARS (charset) - + XCHARSET_BYTE_OFFSET (charset); - else if (XCHARSET_CHARS (charset) == 94) - return (MIN_CHAR_94x94 - + (XCHARSET_FINAL (charset) - '0') * 94 * 94 <= ch) - && (ch < MIN_CHAR_94x94 - + (XCHARSET_FINAL (charset) - '0' + 1) * 94 * 94) ? - ((ch - MIN_CHAR_94x94) % 94) + 33 : 0; - else /* if (XCHARSET_CHARS (charset) == 96) */ - return (MIN_CHAR_96x96 - + (XCHARSET_FINAL (charset) - '0') * 96 * 96 <= ch) - && (ch < MIN_CHAR_96x96 - + (XCHARSET_FINAL (charset) - '0' + 1) * 96 * 96) ? - ((ch - MIN_CHAR_96x96) % 96) + 32 : 0; - } -} - Lisp_Object Vdefault_coded_charset_priority_list; #endif