From: tomo Date: Thu, 31 Oct 2002 08:17:33 +0000 (+0000) Subject: (char_encode_as_entity_reference): Modify for `charset_code_point'. X-Git-Tag: r21-4-9-utf-2000-0_19-ecdo~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=078ea7351a4c31a6f2f567f2123735a7fb29ee40;p=chise%2Fxemacs-chise.git (char_encode_as_entity_reference): Modify for `charset_code_point'. (char_encode_shift_jis): Likewise. (char_encode_big5): Likewise. (char_encode_iso2022): Likewise. --- diff --git a/src/text-coding.c b/src/text-coding.c index e2bbd7c..843c0a5 100644 --- a/src/text-coding.c +++ b/src/text-coding.c @@ -3366,7 +3366,7 @@ char_encode_as_entity_reference (Emchar ch, char* buf) char_type = Qnil; if (!NILP (ccs = Ffind_charset (ccs))) { - int code_point = charset_code_point (ccs, ch); + int code_point = charset_code_point (ccs, ch, 0); if ( (code_point >= 0) && (NILP (char_type) @@ -3643,12 +3643,12 @@ char_encode_shift_jis (struct encoding_stream *str, Emchar ch, { unsigned int s1, s2; #ifdef UTF2000 - int code_point = charset_code_point (Vcharset_latin_jisx0201, ch); + int code_point = charset_code_point (Vcharset_latin_jisx0201, ch, 0); if (code_point >= 0) Dynarr_add (dst, code_point); else if ((code_point - = charset_code_point (Vcharset_japanese_jisx0208_1990, ch)) + = charset_code_point (Vcharset_japanese_jisx0208_1990, ch, 0)) >= 0) { ENCODE_SJIS ((code_point >> 8) | 0x80, @@ -3657,11 +3657,11 @@ char_encode_shift_jis (struct encoding_stream *str, Emchar ch, Dynarr_add (dst, s2); } else if ((code_point - = charset_code_point (Vcharset_katakana_jisx0201, ch)) + = charset_code_point (Vcharset_katakana_jisx0201, ch, 0)) >= 0) Dynarr_add (dst, code_point | 0x80); else if ((code_point - = charset_code_point (Vcharset_japanese_jisx0208, ch)) + = charset_code_point (Vcharset_japanese_jisx0208, ch, 0)) >= 0) { ENCODE_SJIS ((code_point >> 8) | 0x80, @@ -3669,7 +3669,7 @@ char_encode_shift_jis (struct encoding_stream *str, Emchar ch, Dynarr_add (dst, s1); Dynarr_add (dst, s2); } - else if ((code_point = charset_code_point (Vcharset_ascii, ch)) + else if ((code_point = charset_code_point (Vcharset_ascii, ch, 0)) >= 0) Dynarr_add (dst, code_point); else @@ -3994,21 +3994,21 @@ char_encode_big5 (struct encoding_stream *str, Emchar ch, Lisp_Object ccs = CODING_SYSTEM_ISO2022_INITIAL_CHARSET (str->codesys, 1); - if ((code_point = charset_code_point (Vcharset_ascii, ch)) >= 0) + if ((code_point = charset_code_point (Vcharset_ascii, ch, 0)) >= 0) Dynarr_add (dst, code_point); - else if ((code_point = charset_code_point (ccs, ch)) >= 0) + else if ((code_point = charset_code_point (ccs, ch, 0)) >= 0) { Dynarr_add (dst, code_point >> 8); Dynarr_add (dst, code_point & 0xFF); } else if ((code_point - = charset_code_point (Vcharset_chinese_big5, ch)) >= 0) + = charset_code_point (Vcharset_chinese_big5, ch, 0)) >= 0) { Dynarr_add (dst, code_point >> 8); Dynarr_add (dst, code_point & 0xFF); } else if ((code_point - = charset_code_point (Vcharset_chinese_big5_1, ch)) >= 0) + = charset_code_point (Vcharset_chinese_big5_1, ch, 0)) >= 0) { unsigned int I = ((code_point >> 8) - 33) * (0xFF - 0xA1) @@ -4021,7 +4021,7 @@ char_encode_big5 (struct encoding_stream *str, Emchar ch, Dynarr_add (dst, b2); } else if ((code_point - = charset_code_point (Vcharset_chinese_big5_2, ch)) >= 0) + = charset_code_point (Vcharset_chinese_big5_2, ch, 0)) >= 0) { unsigned int I = ((code_point >> 8) - 33) * (0xFF - 0xA1) @@ -4563,7 +4563,7 @@ char_encode_utf8 (struct encoding_stream *str, Emchar ch, { Lisp_Object ucs_ccs = CODING_SYSTEM_ISO2022_INITIAL_CHARSET (str->codesys, 0); - int code_point = charset_code_point (ucs_ccs, ch); + int code_point = charset_code_point (ucs_ccs, ch, 0); if ( (code_point < 0) || (code_point > 0x10FFFF) ) { @@ -5909,12 +5909,12 @@ char_encode_iso2022 (struct encoding_stream *str, Emchar ch, for (i = 0; i < 4; i++) { if ((CHARSETP (charset = str->iso2022.charset[i]) - && ((code_point = charset_code_point (charset, ch)) >= 0)) + && ((code_point = charset_code_point (charset, ch, 0)) >= 0)) || (CHARSETP (charset = CODING_SYSTEM_ISO2022_INITIAL_CHARSET (codesys, i)) - && ((code_point = charset_code_point (charset, ch)) >= 0))) + && ((code_point = charset_code_point (charset, ch, 0)) >= 0))) { reg = i; break;