From: tomo Date: Sat, 13 Nov 1999 13:23:34 +0000 (+0000) Subject: (Fset_charset_mapping_table): Fix problem with `ascii'. X-Git-Tag: r21-2-19-utf-2000-0_12-0~94 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=5854fb5730482af8fb33e449621f5241bd1a7d74;p=chise%2Fxemacs-chise.git.1 (Fset_charset_mapping_table): Fix problem with `ascii'. --- diff --git a/src/mule-charset.c b/src/mule-charset.c index ec831f3..fe66cef 100644 --- a/src/mule-charset.c +++ b/src/mule-charset.c @@ -2159,7 +2159,16 @@ Set mapping-table of CHARSET to TABLE. } else if (VECTORP (table)) { - if (XVECTOR_LENGTH (table) > CHARSET_CHARS (cs)) + int ccs_len; + + /* ad-hoc method for `ascii' */ + if ((CHARSET_CHARS (cs) == 94) && + (CHARSET_BYTE_OFFSET (cs) != 33)) + ccs_len = 128 - CHARSET_BYTE_OFFSET (cs); + else + ccs_len = CHARSET_CHARS (cs); + + if (XVECTOR_LENGTH (table) > ccs_len) args_out_of_range (table, make_int (CHARSET_CHARS (cs))); old_table = CHARSET_DECODING_TABLE(cs); CHARSET_DECODING_TABLE(cs) = table;