Mercurial > emacs
comparison src/charset.c @ 90021:69699ae00d9c
(Fset_unibyte_charset): Setup
unibyte_has_multibyte_table.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 15 Oct 2004 02:10:42 +0000 |
parents | 77df4a7f419a |
children | e29d4e885eca |
comparison
equal
deleted
inserted
replaced
90020:680f4ba0cdc9 | 90021:69699ae00d9c |
---|---|
1172 CHECK_CHARSET_GET_CHARSET (charset, cs); | 1172 CHECK_CHARSET_GET_CHARSET (charset, cs); |
1173 if (! cs->ascii_compatible_p | 1173 if (! cs->ascii_compatible_p |
1174 || cs->dimension != 1) | 1174 || cs->dimension != 1) |
1175 error ("Inappropriate unibyte charset: %s", SDATA (SYMBOL_NAME (charset))); | 1175 error ("Inappropriate unibyte charset: %s", SDATA (SYMBOL_NAME (charset))); |
1176 charset_unibyte = cs->id; | 1176 charset_unibyte = cs->id; |
1177 memset (unibyte_has_multibyte_table, 1, 128); | |
1177 for (i = 128; i < 256; i++) | 1178 for (i = 128; i < 256; i++) |
1178 { | 1179 { |
1179 c = DECODE_CHAR (cs, i); | 1180 c = DECODE_CHAR (cs, i); |
1180 unibyte_to_multibyte_table[i] = (c < 0 ? BYTE8_TO_CHAR (i) : c); | 1181 unibyte_to_multibyte_table[i] = (c < 0 ? BYTE8_TO_CHAR (i) : c); |
1182 unibyte_has_multibyte_table[i] = c >= 0; | |
1181 } | 1183 } |
1182 | 1184 |
1183 return Qnil; | 1185 return Qnil; |
1184 } | 1186 } |
1185 | 1187 |