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

Back to archive index

Takuro Ashie makei****@users*****
2006年 11月 26日 (日) 08:17:14 JST


Index: tomoe/lib/tomoe-dict.c
diff -u tomoe/lib/tomoe-dict.c:1.75 tomoe/lib/tomoe-dict.c:1.76
--- tomoe/lib/tomoe-dict.c:1.75	Sun Nov 26 08:04:47 2006
+++ tomoe/lib/tomoe-dict.c	Sun Nov 26 08:17:14 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.75 2006/11/25 23:04:47 makeinu Exp $
+ *  $Id: tomoe-dict.c,v 1.76 2006/11/25 23:17:14 makeinu Exp $
  */
 
 #include <stdio.h>
@@ -265,7 +265,7 @@
 void
 tomoe_dict_save (TomoeDict *dict)
 {
-    tomeo_dict_save_xml (dict);
+    tomoe_dict_save_xml (dict);
 }
 
 const char*
@@ -725,12 +725,10 @@
 
     xmlNewChild (parent, NULL, BAD_CAST meta_key, BAD_CAST meta_value);
 }
-#endif
 
 static void
 tomoe_dict_save_xml (TomoeDict *dict)
 {
-#if 0
     TomoeDictPrivate *priv;
     xmlDocPtr doc;
     const char* param[3];
@@ -811,7 +809,24 @@
     xmlFreeDoc (doc);
     xmlCleanupCharEncodingHandlers();
     tomoe_dict_set_modified (dict, 0);
+}
 #endif
+
+static void
+tomoe_dict_save_xml (TomoeDict *dict)
+{
+    TomoeDictPrivate *priv;
+    FILE *f;
+
+    g_return_if_fail (TOMOE_IS_DICT (dict));
+    if (!tomoe_dict_is_editable (dict)) return;
+
+    priv = TOMOE_DICT_GET_PRIVATE(dict);
+
+    f = fopen (priv->filename, "wb");
+    g_return_if_fail (f);
+
+    fclose (f);
 }
 
 /*


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