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

アーカイブの一覧に戻る

Takuro Ashie makei****@users*****
2006年 11月 27日 (月) 16:43:37 JST


Index: tomoe/lib/tomoe-dict.c
diff -u tomoe/lib/tomoe-dict.c:1.103 tomoe/lib/tomoe-dict.c:1.104
--- tomoe/lib/tomoe-dict.c:1.103	Mon Nov 27 16:08:43 2006
+++ tomoe/lib/tomoe-dict.c	Mon Nov 27 16:43:36 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.103 2006/11/27 07:08:43 makeinu Exp $
+ *  $Id: tomoe-dict.c,v 1.104 2006/11/27 07:43:36 makeinu Exp $
  */
 
 #include <stdio.h>
@@ -543,7 +543,10 @@
     }
 
     if (!strcmp ("stroke", element_name)) {
-        g_return_if_fail (data->writing);
+        if (!data->writing) {
+            set_parse_error (context, error, data);
+            return;
+        }
         data->state = STATE_STROKE;
         data->n_points = 0;
         return;
@@ -552,7 +555,10 @@
     if (!strcmp ("point", element_name)) {
         gint idx, x, y;
 
-        g_return_if_fail (data->state == STATE_STROKE);
+        if (data->state != STATE_STROKE) {
+            set_parse_error (context, error, data);
+            return;
+        }
 
         data->state = STATE_POINT;
 
@@ -581,7 +587,10 @@
     if (!strcmp ("reading", element_name)) {
         gint idx;
 
-        g_return_if_fail (data->state == STATE_READINGS);
+        if (data->state != STATE_READINGS) {
+            set_parse_error (context, error, data);
+            return;
+        }
 
         data->state = STATE_READING;
         data->reading_type = TOMOE_READING_INVALID;
@@ -609,6 +618,8 @@
         data->key   = g_strdup (element_name);
         data->value = NULL;
     }
+
+    /* thow error? */
 }
 
 static void


tomoe-cvs メーリングリストの案内
アーカイブの一覧に戻る