XEmacs 21.2.13
[chise/xemacs-chise.git.1] / src / mule-charset.c
index 9c5499b..96b01bc 100644 (file)
@@ -58,6 +58,8 @@ Lisp_Object Vcharset_chinese_big5_2;
 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 Vcharset_composite;
 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 @@ non_ascii_valid_char_p (Emchar ch)
       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 @@ non_ascii_valid_char_p (Emchar ch)
            return 0;
          return 1;
        }
+#endif /* ENABLE_COMPOSITE_CHARS */
 
       if (f2 != 0x20 && f2 != 0x7F && f3 != 0x20 && f3 != 0x7F)
        return 1;
@@ -1066,6 +1072,7 @@ N defaults to 0 if omitted.
 }
 
 \f
+#ifdef ENABLE_COMPOSITE_CHARS
 /************************************************************************/
 /*                     composite character functions                    */
 /************************************************************************/
@@ -1111,7 +1118,7 @@ composite_char_string (Emchar ch)
   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 @@ the string.
                                           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 @@ Return a string of the characters comprising a composite character.
     signal_simple_error ("Must be composite char", ch);
   return composite_char_string (emch);
 }
+#endif /* ENABLE_COMPOSITE_CHARS */
 
 \f
 /************************************************************************/
@@ -1165,8 +1173,10 @@ syms_of_mule_charset (void)
   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 @@ complex_vars_of_mule_charset (void)
                  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 @@ complex_vars_of_mule_charset (void)
     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 */
 
 }