Lisp_Object Vcharset_latin_viscii_upper;
Lisp_Object Vcharset_chinese_big5;
Lisp_Object Vcharset_chinese_big5_cdp;
+Lisp_Object Vcharset_ideograph_hanziku_1;
+Lisp_Object Vcharset_ideograph_hanziku_2;
+Lisp_Object Vcharset_ideograph_hanziku_3;
+Lisp_Object Vcharset_ideograph_hanziku_4;
+Lisp_Object Vcharset_ideograph_hanziku_5;
+Lisp_Object Vcharset_ideograph_hanziku_6;
+Lisp_Object Vcharset_ideograph_hanziku_7;
+Lisp_Object Vcharset_ideograph_hanziku_8;
+Lisp_Object Vcharset_ideograph_hanziku_9;
+Lisp_Object Vcharset_ideograph_hanziku_10;
+Lisp_Object Vcharset_ideograph_hanziku_11;
+Lisp_Object Vcharset_ideograph_hanziku_12;
Lisp_Object Vcharset_china3_jef;
Lisp_Object Vcharset_ideograph_cbeta;
Lisp_Object Vcharset_ideograph_gt;
Qvietnamese_viscii_upper,
Qchinese_big5,
Qchinese_big5_cdp,
+ Qideograph_hanziku_1,
+ Qideograph_hanziku_2,
+ Qideograph_hanziku_3,
+ Qideograph_hanziku_4,
+ Qideograph_hanziku_5,
+ Qideograph_hanziku_6,
+ Qideograph_hanziku_7,
+ Qideograph_hanziku_8,
+ Qideograph_hanziku_9,
+ Qideograph_hanziku_10,
+ Qideograph_hanziku_11,
+ Qideograph_hanziku_12,
Qchina3_jef,
Qideograph_cbeta,
Qideograph_daikanwa,
/************************************************************************/
#ifdef UTF2000
-DEFUN ("decode-char", Fdecode_char, 2, 2, 0, /*
+DEFUN ("decode-char", Fdecode_char, 2, 3, 0, /*
Make a character from CHARSET and code-point CODE.
+If DEFINED_ONLY is non-nil, builtin character is not returned.
+If corresponding character is not found, nil is returned.
*/
- (charset, code))
+ (charset, code, defined_only))
{
int c;
c = XINT (code);
if (XCHARSET_GRAPHIC (charset) == 1)
c &= 0x7F7F7F7F;
- c = DECODE_CHAR (charset, c);
+ if (NILP (defined_only))
+ c = DECODE_CHAR (charset, c);
+ else
+ c = DECODE_DEFINED_CHAR (charset, c);
return c >= 0 ? make_char (c) : Qnil;
}
CHECK_INT (code);
if (EQ (charset, Vcharset_latin_viscii))
{
- Lisp_Object chr = Fdecode_char (charset, code);
+ Lisp_Object chr = Fdecode_char (charset, code, Qnil);
Lisp_Object ret;
if (!NILP (chr))
c &= 0x7F7F7F7F;
#endif
c = decode_builtin_char (charset, c);
- return c >= 0 ? make_char (c) : Fdecode_char (charset, code);
+ return c >= 0 ? make_char (c) : Fdecode_char (charset, code, Qnil);
}
#endif
defsymbol (&Qideograph_daikanwa, "ideograph-daikanwa");
defsymbol (&Qchinese_big5, "chinese-big5");
defsymbol (&Qchinese_big5_cdp, "chinese-big5-cdp");
+ defsymbol (&Qideograph_hanziku_1, "ideograph-hanziku-1");
+ defsymbol (&Qideograph_hanziku_2, "ideograph-hanziku-2");
+ defsymbol (&Qideograph_hanziku_3, "ideograph-hanziku-3");
+ defsymbol (&Qideograph_hanziku_4, "ideograph-hanziku-4");
+ defsymbol (&Qideograph_hanziku_5, "ideograph-hanziku-5");
+ defsymbol (&Qideograph_hanziku_6, "ideograph-hanziku-6");
+ defsymbol (&Qideograph_hanziku_7, "ideograph-hanziku-7");
+ defsymbol (&Qideograph_hanziku_8, "ideograph-hanziku-8");
+ defsymbol (&Qideograph_hanziku_9, "ideograph-hanziku-9");
+ defsymbol (&Qideograph_hanziku_10, "ideograph-hanziku-10");
+ defsymbol (&Qideograph_hanziku_11, "ideograph-hanziku-11");
+ defsymbol (&Qideograph_hanziku_12, "ideograph-hanziku-12");
defsymbol (&Qchina3_jef, "china3-jef");
defsymbol (&Qideograph_cbeta, "ideograph-cbeta");
defsymbol (&Qmojikyo, "mojikyo");
build_string ("Big5"),
build_string ("Big5 Chinese traditional"),
build_string ("big5"),
- Qnil, 0, 0, 0, 0);
+ Qnil,
+ /* 0 */ MIN_CHAR_BIG5_CDP,
+ /* 0 */ MAX_CHAR_BIG5_CDP, 0, 0);
staticpro (&Vcharset_chinese_big5_cdp);
Vcharset_chinese_big5_cdp =
make_charset (LEADING_BYTE_CHINESE_BIG5_CDP, Qchinese_big5_cdp, 256, 2,
build_string ("Big5 + CDP extension"),
build_string ("Big5 with CDP extension"),
build_string ("big5\\.cdp-0"),
- Qnil, 0, 0, 0, 0);
+ Qnil, MIN_CHAR_BIG5_CDP, MAX_CHAR_BIG5_CDP, 0, 0);
+#define DEF_HANZIKU(n) \
+ staticpro (&Vcharset_ideograph_hanziku_##n); \
+ Vcharset_ideograph_hanziku_##n = \
+ make_charset (LEADING_BYTE_HANZIKU_##n, Qideograph_hanziku_##n, 256, 2, \
+ 2, 2, 0, CHARSET_LEFT_TO_RIGHT, \
+ build_string ("HZK-"#n), \
+ build_string ("HANZIKU-"#n), \
+ build_string ("HANZIKU (pseudo BIG5 encoding) part "#n), \
+ build_string \
+ ("hanziku-"#n"$"), \
+ Qnil, MIN_CHAR_HANZIKU_##n, MAX_CHAR_HANZIKU_##n, 0, 0);
+ DEF_HANZIKU (1);
+ DEF_HANZIKU (2);
+ DEF_HANZIKU (3);
+ DEF_HANZIKU (4);
+ DEF_HANZIKU (5);
+ DEF_HANZIKU (6);
+ DEF_HANZIKU (7);
+ DEF_HANZIKU (8);
+ DEF_HANZIKU (9);
+ DEF_HANZIKU (10);
+ DEF_HANZIKU (11);
+ DEF_HANZIKU (12);
staticpro (&Vcharset_china3_jef);
Vcharset_china3_jef =
make_charset (LEADING_BYTE_CHINA3_JEF, Qchina3_jef, 256, 2,