Mercurial > hg > xemacs-beta
comparison src/mule-charset.c @ 414:da8ed4261e83 r21-2-15
Import from CVS: tag r21-2-15
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:21:38 +0200 |
parents | 697ef44129c6 |
children | ebe98a74bd68 |
comparison
equal
deleted
inserted
replaced
413:901169e5ca31 | 414:da8ed4261e83 |
---|---|
1065 else if (EQ (charset, Vcharset_control_1)) lowlim = 0, highlim = 31; | 1065 else if (EQ (charset, Vcharset_control_1)) lowlim = 0, highlim = 31; |
1066 else if (CHARSET_CHARS (cs) == 94) lowlim = 33, highlim = 126; | 1066 else if (CHARSET_CHARS (cs) == 94) lowlim = 33, highlim = 126; |
1067 else /* CHARSET_CHARS (cs) == 96) */ lowlim = 32, highlim = 127; | 1067 else /* CHARSET_CHARS (cs) == 96) */ lowlim = 32, highlim = 127; |
1068 | 1068 |
1069 CHECK_INT (arg1); | 1069 CHECK_INT (arg1); |
1070 a1 = XINT (arg1); | 1070 /* It is useful (and safe, according to Olivier Galibert) to strip |
1071 the 8th bit off ARG1 and ARG2 becaue it allows programmers to | |
1072 write (make-char 'latin-iso8859-2 CODE) where code is the actual | |
1073 Latin 2 code of the character. */ | |
1074 a1 = XINT (arg1) & 0x7f; | |
1071 if (a1 < lowlim || a1 > highlim) | 1075 if (a1 < lowlim || a1 > highlim) |
1072 args_out_of_range_3 (arg1, make_int (lowlim), make_int (highlim)); | 1076 args_out_of_range_3 (arg1, make_int (lowlim), make_int (highlim)); |
1073 | 1077 |
1074 if (CHARSET_DIMENSION (cs) == 1) | 1078 if (CHARSET_DIMENSION (cs) == 1) |
1075 { | 1079 { |
1078 ("Charset is of dimension one; second octet must be nil", arg2); | 1082 ("Charset is of dimension one; second octet must be nil", arg2); |
1079 return make_char (MAKE_CHAR (charset, a1, 0)); | 1083 return make_char (MAKE_CHAR (charset, a1, 0)); |
1080 } | 1084 } |
1081 | 1085 |
1082 CHECK_INT (arg2); | 1086 CHECK_INT (arg2); |
1083 a2 = XINT (arg2); | 1087 a2 = XINT (arg2) & 0x7f; |
1084 if (a2 < lowlim || a2 > highlim) | 1088 if (a2 < lowlim || a2 > highlim) |
1085 args_out_of_range_3 (arg2, make_int (lowlim), make_int (highlim)); | 1089 args_out_of_range_3 (arg2, make_int (lowlim), make_int (highlim)); |
1086 | 1090 |
1087 return make_char (MAKE_CHAR (charset, a1, a2)); | 1091 return make_char (MAKE_CHAR (charset, a1, a2)); |
1088 } | 1092 } |
1419 CHARSET_LEFT_TO_RIGHT, | 1423 CHARSET_LEFT_TO_RIGHT, |
1420 build_string ("JISX0208.1978"), | 1424 build_string ("JISX0208.1978"), |
1421 build_string ("JISX0208.1978 (Japanese)"), | 1425 build_string ("JISX0208.1978 (Japanese)"), |
1422 build_string | 1426 build_string |
1423 ("JISX0208.1978 Japanese Kanji (so called \"old JIS\")"), | 1427 ("JISX0208.1978 Japanese Kanji (so called \"old JIS\")"), |
1424 build_string ("\\(jisx0208\\|jisc6226\\).19")); | 1428 build_string ("\\(jisx0208\\|jisc6226\\)\\.1978")); |
1425 Vcharset_chinese_gb2312 = | 1429 Vcharset_chinese_gb2312 = |
1426 make_charset (LEADING_BYTE_CHINESE_GB2312, Qchinese_gb2312, 3, | 1430 make_charset (LEADING_BYTE_CHINESE_GB2312, Qchinese_gb2312, 3, |
1427 CHARSET_TYPE_94X94, 2, 0, 'A', | 1431 CHARSET_TYPE_94X94, 2, 0, 'A', |
1428 CHARSET_LEFT_TO_RIGHT, | 1432 CHARSET_LEFT_TO_RIGHT, |
1429 build_string ("GB2312"), | 1433 build_string ("GB2312"), |