[Tomoe-cvs 1131] CVS update: tomoe/lib

Back to archive index

Takuro Ashie makei****@users*****
2006年 11月 27日 (月) 15:24:26 JST


Index: tomoe/lib/tomoe-dict.c
diff -u tomoe/lib/tomoe-dict.c:1.97 tomoe/lib/tomoe-dict.c:1.98
--- tomoe/lib/tomoe-dict.c:1.97	Mon Nov 27 14:52:21 2006
+++ tomoe/lib/tomoe-dict.c	Mon Nov 27 15:24:26 2006
@@ -21,7 +21,7 @@
  *  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  *  Boston, MA  02111-1307  USA
  *
- *  $Id: tomoe-dict.c,v 1.97 2006/11/27 05:52:21 makeinu Exp $
+ *  $Id: tomoe-dict.c,v 1.98 2006/11/27 06:24:26 makeinu Exp $
  */
 
 #include <stdio.h>
@@ -444,6 +444,7 @@
 
     gboolean in_dict;
     gboolean in_codepoint;
+    gboolean in_n_strokes;
     gboolean in_stroke;
     gboolean in_readings;
     gboolean in_reading;
@@ -532,6 +533,11 @@
         return;
     }
 
+    if (!strcmp ("number-of-strokes", element_name)) {
+        data->in_n_strokes = TRUE;
+        return;
+    }
+
     if (!strcmp ("strokes", element_name)) {
         data->writing = tomoe_writing_new ();
         return;
@@ -631,6 +637,11 @@
         return;
     }
 
+    if (!strcmp ("number-of-strokes", element_name)) {
+        data->in_n_strokes = FALSE;
+        return;
+    }
+
     if (!strcmp ("strokes", element_name)) {
         if (data->chr && data->writing)
             tomoe_char_set_writing (data->chr, data->writing);
@@ -688,17 +699,26 @@
         return;
     }
 
+    if (data->in_n_strokes) {
+        gint n_strokes = atoi (text);
+#if 0
+        tomoe_char_set_number_of_strokes (n_strokes);
+#endif
+    }
+
     if (data->in_reading) {
         TomoeReading *reading;
 
         reading = tomoe_reading_new (data->reading_type, text);
         tomoe_char_add_reading (data->chr, reading);
         g_object_unref (reading);
+        return;
     }
 
     if (data->in_meta) {
         g_free (data->value);
         data->value = g_strdup (text);
+        return;
     }
 }
 
@@ -743,6 +763,7 @@
     data.priv        = priv;
     data.in_dict     = FALSE;
     data.in_codepoint= FALSE;
+    data.in_n_strokes= FALSE;
     data.in_stroke   = FALSE;
     data.in_readings = FALSE;
     data.in_reading  = FALSE;


tomoe-cvs メーリングリストの案内
Back to archive index