Mercurial > hg > xemacs-beta
comparison src/mule-charset.c @ 347:7c94d56991e1 r21-1-3
Import from CVS: tag r21-1-3
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:53:48 +0200 |
parents | fbbf69b4e8a7 |
children | 8e84bee8ddd0 |
comparison
equal
deleted
inserted
replaced
346:dd0986ffd2cf | 347:7c94d56991e1 |
---|---|
1018 else if (EQ (charset, Vcharset_control_1)) lowlim = 0, highlim = 31; | 1018 else if (EQ (charset, Vcharset_control_1)) lowlim = 0, highlim = 31; |
1019 else if (CHARSET_CHARS (cs) == 94) lowlim = 33, highlim = 126; | 1019 else if (CHARSET_CHARS (cs) == 94) lowlim = 33, highlim = 126; |
1020 else /* CHARSET_CHARS (cs) == 96) */ lowlim = 32, highlim = 127; | 1020 else /* CHARSET_CHARS (cs) == 96) */ lowlim = 32, highlim = 127; |
1021 | 1021 |
1022 CHECK_INT (arg1); | 1022 CHECK_INT (arg1); |
1023 a1 = XINT (arg1); | 1023 /* It is useful (and safe, according to Olivier Galibert) to strip |
1024 the 8th bit off ARG1 and ARG2 becaue it allows programmers to | |
1025 write (make-char 'latin-iso8859-2 CODE) where code is the actual | |
1026 Latin 2 code of the character. */ | |
1027 a1 = XINT (arg1) & 0x7f; | |
1024 if (a1 < lowlim || a1 > highlim) | 1028 if (a1 < lowlim || a1 > highlim) |
1025 args_out_of_range_3 (arg1, make_int (lowlim), make_int (highlim)); | 1029 args_out_of_range_3 (arg1, make_int (lowlim), make_int (highlim)); |
1026 | 1030 |
1027 if (CHARSET_DIMENSION (cs) == 1) | 1031 if (CHARSET_DIMENSION (cs) == 1) |
1028 { | 1032 { |
1031 ("Charset is of dimension one; second octet must be nil", arg2); | 1035 ("Charset is of dimension one; second octet must be nil", arg2); |
1032 return make_char (MAKE_CHAR (charset, a1, 0)); | 1036 return make_char (MAKE_CHAR (charset, a1, 0)); |
1033 } | 1037 } |
1034 | 1038 |
1035 CHECK_INT (arg2); | 1039 CHECK_INT (arg2); |
1036 a2 = XINT (arg2); | 1040 a2 = XINT (arg2) & 0x7f; |
1037 if (a2 < lowlim || a2 > highlim) | 1041 if (a2 < lowlim || a2 > highlim) |
1038 args_out_of_range_3 (arg2, make_int (lowlim), make_int (highlim)); | 1042 args_out_of_range_3 (arg2, make_int (lowlim), make_int (highlim)); |
1039 | 1043 |
1040 return make_char (MAKE_CHAR (charset, a1, a2)); | 1044 return make_char (MAKE_CHAR (charset, a1, a2)); |
1041 } | 1045 } |
1345 LEADING_BYTE_JAPANESE_JISX0208_1978, 3, | 1349 LEADING_BYTE_JAPANESE_JISX0208_1978, 3, |
1346 CHARSET_TYPE_94X94, 2, 0, '@', | 1350 CHARSET_TYPE_94X94, 2, 0, '@', |
1347 CHARSET_LEFT_TO_RIGHT, | 1351 CHARSET_LEFT_TO_RIGHT, |
1348 build_string | 1352 build_string |
1349 ("JIS X0208-1978 (Japanese Kanji; Old Version)"), | 1353 ("JIS X0208-1978 (Japanese Kanji; Old Version)"), |
1350 build_string ("\\(jisx0208\\|jisc6226\\).19")); | 1354 build_string ("\\(jisx0208\\|jisc6226\\).1978")); |
1351 Vcharset_japanese_jisx0208 = | 1355 Vcharset_japanese_jisx0208 = |
1352 make_charset (146, Qjapanese_jisx0208, | 1356 make_charset (146, Qjapanese_jisx0208, |
1353 LEADING_BYTE_JAPANESE_JISX0208, 3, | 1357 LEADING_BYTE_JAPANESE_JISX0208, 3, |
1354 CHARSET_TYPE_94X94, 2, 0, 'B', | 1358 CHARSET_TYPE_94X94, 2, 0, 'B', |
1355 CHARSET_LEFT_TO_RIGHT, | 1359 CHARSET_LEFT_TO_RIGHT, |