(Vcharacter_ideographic_radical_table): New variable.
authortomo <tomo>
Fri, 2 Jun 2000 06:07:08 +0000 (06:07 +0000)
committertomo <tomo>
Fri, 2 Jun 2000 06:07:08 +0000 (06:07 +0000)
(Vcharacter_ideographic_strokes_table): New variable.
(Qideographic_radical): New variable.
(Qideographic_strokes): New variable.
(Fchar_attribute_alist): Use `Vcharacter_ideographic_radical_table'
for `ideographic-radical' attribute; use
`Vcharacter_ideographic_strokes_table' for `ideographic-strokes'
attribute.
(Fget_char_attribute): Likewise.
(Fput_char_attribute): Likewise.
(syms_of_mule_charset): Add new symbol `ideographic-radical' and
`ideographic-strokes'.
(vars_of_mule_charset): Setup `Vcharacter_ideographic_radical_table'
and `Vcharacter_ideographic_strokes_table'.

src/mule-charset.c

index a16fe1a..e58ff51 100644 (file)
@@ -423,12 +423,15 @@ put_char_id_table (Emchar ch, Lisp_Object value, Lisp_Object table)
 
 Lisp_Object Vcharacter_attribute_table;
 Lisp_Object Vcharacter_name_table;
+Lisp_Object Vcharacter_ideographic_radical_table;
+Lisp_Object Vcharacter_ideographic_strokes_table;
 Lisp_Object Vcharacter_total_strokes_table;
 Lisp_Object Vcharacter_decomposition_table;
 Lisp_Object Vcharacter_composition_table;
 Lisp_Object Vcharacter_variant_table;
 
 Lisp_Object Qname;
+Lisp_Object Qideographic_radical, Qideographic_strokes;
 Lisp_Object Qtotal_strokes;
 Lisp_Object Q_decomposition;
 Lisp_Object Qucs;
@@ -564,6 +567,16 @@ Return the alist of attributes of CHARACTER.
   if (!NILP (ret))
     alist = Fcons (Fcons (Qname, ret), alist);
 
+  ret = get_char_id_table (XCHAR (character),
+                          Vcharacter_ideographic_radical_table);
+  if (!NILP (ret))
+    alist = Fcons (Fcons (Qideographic_radical, ret), alist);
+
+  ret = get_char_id_table (XCHAR (character),
+                          Vcharacter_ideographic_strokes_table);
+  if (!NILP (ret))
+    alist = Fcons (Fcons (Qideographic_strokes, ret), alist);
+
   ret = get_char_id_table (XCHAR (character), Vcharacter_total_strokes_table);
   if (!NILP (ret))
     alist = Fcons (Fcons (Qtotal_strokes, ret), alist);
@@ -597,6 +610,16 @@ Return the value of CHARACTER's ATTRIBUTE.
     {
       return get_char_id_table (XCHAR (character), Vcharacter_name_table);
     }
+  else if (EQ (attribute, Qideographic_radical))
+    {
+      return get_char_id_table (XCHAR (character),
+                               Vcharacter_ideographic_radical_table);
+    }
+  else if (EQ (attribute, Qideographic_strokes))
+    {
+      return get_char_id_table (XCHAR (character),
+                               Vcharacter_ideographic_strokes_table);
+    }
   else if (EQ (attribute, Qtotal_strokes))
     {
       return get_char_id_table (XCHAR (character),
@@ -638,6 +661,20 @@ Store CHARACTER's ATTRIBUTE with VALUE.
       put_char_id_table (XCHAR (character), value, Vcharacter_name_table);
       return value;
     }
+  else if (EQ (attribute, Qideographic_radical))
+    {
+      CHECK_INT (value);
+      put_char_id_table (XCHAR (character), value,
+                        Vcharacter_ideographic_radical_table);
+      return value;
+    }
+  else if (EQ (attribute, Qideographic_strokes))
+    {
+      CHECK_INT (value);
+      put_char_id_table (XCHAR (character), value,
+                        Vcharacter_ideographic_strokes_table);
+      return value;
+    }
   else if (EQ (attribute, Qtotal_strokes))
     {
       CHECK_INT (value);
@@ -2990,6 +3027,8 @@ syms_of_mule_charset (void)
   defsymbol (&Qchinese_cns11643_2,     "chinese-cns11643-2");
 #ifdef UTF2000
   defsymbol (&Qname,                   "name");
+  defsymbol (&Qideographic_radical,    "ideographic-radical");
+  defsymbol (&Qideographic_strokes,    "ideographic-strokes");
   defsymbol (&Qtotal_strokes,          "total-strokes");
   defsymbol (&Q_ucs,                   "->ucs");
   defsymbol (&Q_decomposition,         "->decomposition");
@@ -3103,7 +3142,13 @@ Version number of UTF-2000.
   staticpro (&Vcharacter_name_table);
   Vcharacter_name_table = make_char_id_table (Qnil, 0);
 
-  /* staticpro (&Vcharacter_name_table); */
+  /* staticpro (&Vcharacter_ideographic_radical_table); */
+  Vcharacter_ideographic_radical_table = make_char_id_table (Qnil, -1);
+
+  /* staticpro (&Vcharacter_ideographic_strokes_table); */
+  Vcharacter_ideographic_strokes_table = make_char_id_table (Qnil, -1);
+
+  /* staticpro (&Vcharacter_total_strokes_table); */
   Vcharacter_total_strokes_table = make_char_id_table (Qnil, -1);
 
   /* staticpro (&Vcharacter_decomposition_table); */