changeset 20720:f084bb8d535f

(min_composite_char): New variable. (Vcharacter_unification_table_vector): New variable. (syms_of_charset): Declare it as a Lisp symbol. Declare a Lisp variable min-composite-char. (unify_char): Delete unnecessary codes.
author Kenichi Handa <handa@m17n.org>
date Thu, 22 Jan 1998 01:26:45 +0000
parents 78d95f2a9d92
children b5b97880b7d0
files src/charset.c
diffstat 1 files changed, 18 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/charset.c	Thu Jan 22 01:26:45 1998 +0000
+++ b/src/charset.c	Thu Jan 22 01:26:45 1998 +0000
@@ -60,6 +60,8 @@
 int charset_big5_1;		/* Big5 Level 1 (Chinese Traditional) */
 int charset_big5_2;		/* Big5 Level 2 (Chinese Traditional) */
 
+int min_composite_char;
+
 Lisp_Object Qcharset_table;
 
 /* A char-table containing information of each character set.  */
@@ -72,6 +74,10 @@
 /* A list of charset symbols ever defined.  */
 Lisp_Object Vcharset_list;
 
+/* Vector of unification table ever defined.
+   An ID of a unification table is an index of this vector.  */
+Lisp_Object Vcharacter_unification_table_vector;
+
 /* Tables used by macros BYTES_BY_CHAR_HEAD and WIDTH_BY_CHAR_HEAD.  */
 int bytes_by_char_head[256];
 int width_by_char_head[256];
@@ -265,8 +271,6 @@
   if (dimension != CHARSET_DIMENSION (charset))
     /* We can't make such a character because of dimension mismatch.  */
     return c;
-  if (!alt_c1) alt_c1 = c1;
-  if (!alt_c2) alt_c2 = c2;
   return MAKE_CHAR (alt_charset, c1, c2);
 }
 
@@ -444,7 +448,7 @@
       if (width == 1)
 	from = LEADING_CODE_EXT_21, to = LEADING_CODE_EXT_22;
       else
-	from = LEADING_CODE_EXT_22, to = LEADING_CODE_EXT_MAX - 1;
+	from = LEADING_CODE_EXT_22, to = LEADING_CODE_EXT_MAX + 1;
     }
 
   for (charset = from; charset < to; charset++)
@@ -1102,10 +1106,7 @@
       unsigned char *str;
 
       if (!INTEGERP (args[i]))
-	{
-	  free (buf);
-	  CHECK_NUMBER (args[i], 0);
-	}
+	CHECK_NUMBER (args[i], 0);
       c = XINT (args[i]);
       len = CHAR_STRING (c, p, str);
       if (p != str)
@@ -1668,6 +1669,12 @@
     "List of charsets ever defined.");
   Vcharset_list = Fcons (Qascii, Qnil);
 
+  DEFVAR_LISP ("character-unification-table-vector",
+	       &Vcharacter_unification_table_vector,
+    "Vector of cons cell of a symbol and unification table ever defined.\n\
+An ID of a unification table is an index of this vector.");
+  Vcharacter_unification_table_vector = Fmake_vector (make_number (16), Qnil);
+
   DEFVAR_INT ("leading-code-composition", &leading_code_composition,
     "Leading-code of composite characters.");
   leading_code_composition = LEADING_CODE_COMPOSITION;
@@ -1694,6 +1701,10 @@
 to convert a Latin-1 or similar 8-bit character code to the corresponding\n\
 Emacs character code.");
   nonascii_insert_offset = 0;
+
+  DEFVAR_INT ("min-composite-char", &min_composite_char,
+    "Minimum character code of a composite character.");
+  min_composite_char = MIN_CHAR_COMPOSITION;
 }
 
 #endif /* emacs */