Mercurial > hg > xemacs-beta
comparison src/unicode.c @ 893:c9f067fd71a3
[xemacs-hg @ 2002-07-02 12:32:34 by stephent]
comment improvements and charset breakage fix <873cv2cnxh.fsf@tleepslib.sk.tsukuba.ac.jp>
author | stephent |
---|---|
date | Tue, 02 Jul 2002 12:32:37 +0000 |
parents | e54d47b2d736 |
children | 7f62a956b825 |
comparison
equal
deleted
inserted
replaced
892:52c2a7139db0 | 893:c9f067fd71a3 |
---|---|
962 int n = Dynarr_length (charsets); | 962 int n = Dynarr_length (charsets); |
963 | 963 |
964 type_checking_assert (code >= 0); | 964 type_checking_assert (code >= 0); |
965 /* This shortcut depends on the representation of an Ichar, see text.c. | 965 /* This shortcut depends on the representation of an Ichar, see text.c. |
966 Note that it may _not_ be extended to U+00A0 to U+00FF (many ISO 8859 | 966 Note that it may _not_ be extended to U+00A0 to U+00FF (many ISO 8859 |
967 coded character sets have points that map into that region). */ | 967 coded character sets have points that map into that region, so this |
968 function is many-valued). */ | |
968 if (code < 0xA0) | 969 if (code < 0xA0) |
969 return (Ichar) code; | 970 return (Ichar) code; |
970 | 971 |
971 BREAKUP_UNICODE_CODE (code, u4, u3, u2, u1, code_levels); | 972 BREAKUP_UNICODE_CODE (code, u4, u3, u2, u1, code_levels); |
972 | 973 |
1181 many Latin characters code points in a few different character sets. */ | 1182 many Latin characters code points in a few different character sets. */ |
1182 if ((EQ (charset, Vcharset_ascii) || | 1183 if ((EQ (charset, Vcharset_ascii) || |
1183 EQ (charset, Vcharset_control_1) || | 1184 EQ (charset, Vcharset_control_1) || |
1184 EQ (charset, Vcharset_latin_iso8859_1)) | 1185 EQ (charset, Vcharset_latin_iso8859_1)) |
1185 && unicode != ichar) | 1186 && unicode != ichar) |
1186 signal_error (Qinvalid_argument, "Can't change Unicode translation for ASCII, Control-1 or Latin-1 char", | 1187 signal_error (Qinvalid_argument, "Can't change Unicode translation for ASCII, Control-1 or Latin-1 character", |
1187 character); | 1188 character); |
1188 | 1189 |
1189 /* #### Composite characters are not properly implemented yet. */ | 1190 /* #### Composite characters are not properly implemented yet. */ |
1190 if (EQ (charset, Vcharset_composite)) | 1191 if (EQ (charset, Vcharset_composite)) |
1191 signal_error (Qinvalid_argument, "Can't set Unicode translation for Composite char", | 1192 signal_error (Qinvalid_argument, "Can't set Unicode translation for Composite char", |