Mercurial > hg > xemacs-beta
diff src/mule-charset.c @ 396:6719134a07c2 r21-2-13
Import from CVS: tag r21-2-13
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:12:05 +0200 |
parents | 1f50e6fe4f3f |
children | 74fd4e045ea6 |
line wrap: on
line diff
--- a/src/mule-charset.c Mon Aug 13 11:11:38 2007 +0200 +++ b/src/mule-charset.c Mon Aug 13 11:12:05 2007 +0200 @@ -58,6 +58,8 @@ Lisp_Object Vcharset_chinese_cns11643_1; Lisp_Object Vcharset_chinese_cns11643_2; Lisp_Object Vcharset_korean_ksc5601; + +#ifdef ENABLE_COMPOSITE_CHARS Lisp_Object Vcharset_composite; /* Hash tables for composite chars. One maps string representing @@ -66,15 +68,17 @@ Lisp_Object Vcomposite_char_char2string_hash_table; Lisp_Object Vcomposite_char_string2char_hash_table; +static int composite_char_row_next; +static int composite_char_col_next; + +#endif /* ENABLE_COMPOSITE_CHARS */ + /* Table of charsets indexed by leading byte. */ Lisp_Object charset_by_leading_byte[128]; /* Table of charsets indexed by type/final-byte/direction. */ Lisp_Object charset_by_attributes[4][128][2]; -static int composite_char_row_next; -static int composite_char_col_next; - /* Table of number of bytes in the string representation of a character indexed by the first byte of that representation. @@ -278,6 +282,7 @@ if (f2 < 0x20 || f3 < 0x20) return 0; +#ifdef ENABLE_COMPOSITE_CHARS if (f1 + FIELD1_TO_OFFICIAL_LEADING_BYTE == LEADING_BYTE_COMPOSITE) { if (UNBOUNDP (Fgethash (make_int (ch), @@ -286,6 +291,7 @@ return 0; return 1; } +#endif /* ENABLE_COMPOSITE_CHARS */ if (f2 != 0x20 && f2 != 0x7F && f3 != 0x20 && f3 != 0x7F) return 1; @@ -1066,6 +1072,7 @@ } +#ifdef ENABLE_COMPOSITE_CHARS /************************************************************************/ /* composite character functions */ /************************************************************************/ @@ -1111,7 +1118,7 @@ return str; } -DEFUN ("make-composite-char", Fmake_composite_char, 1, 1, 0, /* +xxDEFUN ("make-composite-char", Fmake_composite_char, 1, 1, 0, /* Convert a string into a single composite character. The character is the result of overstriking all the characters in the string. @@ -1123,7 +1130,7 @@ XSTRING_LENGTH (string))); } -DEFUN ("composite-char-string", Fcomposite_char_string, 1, 1, 0, /* +xxDEFUN ("composite-char-string", Fcomposite_char_string, 1, 1, 0, /* Return a string of the characters comprising a composite character. */ (ch)) @@ -1136,6 +1143,7 @@ signal_simple_error ("Must be composite char", ch); return composite_char_string (emch); } +#endif /* ENABLE_COMPOSITE_CHARS */ /************************************************************************/ @@ -1165,8 +1173,10 @@ DEFSUBR (Fchar_charset); DEFSUBR (Fchar_octet); +#ifdef ENABLE_COMPOSITE_CHARS DEFSUBR (Fmake_composite_char); DEFSUBR (Fcomposite_char_string); +#endif defsymbol (&Qcharsetp, "charsetp"); defsymbol (&Qregistry, "registry"); @@ -1396,6 +1406,8 @@ CHARSET_LEFT_TO_RIGHT, build_string ("KS C5601 (Hangul and Korean Hanja)"), build_string ("ksc5601")); + +#ifdef ENABLE_COMPOSITE_CHARS /* #### For simplicity, we put composite chars into a 96x96 charset. This is going to lead to problems because you can run out of room, esp. as we don't yet recycle numbers. */ @@ -1415,5 +1427,6 @@ make_lisp_hash_table (500, HASH_TABLE_NON_WEAK, HASH_TABLE_EQ); staticpro (&Vcomposite_char_string2char_hash_table); staticpro (&Vcomposite_char_char2string_hash_table); +#endif /* ENABLE_COMPOSITE_CHARS */ }