From d890e1c9c9b2302e9c367dab27bb64c553208983 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Sun, 26 Jan 2003 04:34:29 +0000 Subject: g_file_exists -> g_file_test. (e_pilot_map_write): don't use doc->root. 2003-01-25 Chris Toshok * e-pilot-map.c (e_pilot_map_read): g_file_exists -> g_file_test. (e_pilot_map_write): don't use doc->root. svn path=/trunk/; revision=19631 --- e-util/ChangeLog | 5 +++++ e-util/e-pilot-map.c | 12 +++++------- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'e-util') diff --git a/e-util/ChangeLog b/e-util/ChangeLog index 8aa4d7740e..f0eaf86194 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,8 @@ +2003-01-25 Chris Toshok + + * e-pilot-map.c (e_pilot_map_read): g_file_exists -> g_file_test. + (e_pilot_map_write): don't use doc->root. + 2003-01-25 Chris Toshok * e-pilot-settings.[ch]: GObjectify this. diff --git a/e-util/e-pilot-map.c b/e-util/e-pilot-map.c index a113427da3..e155657732 100644 --- a/e-util/e-pilot-map.c +++ b/e-util/e-pilot-map.c @@ -25,9 +25,7 @@ #include /* memset(), strcmp() */ #include #include -#include -#include -#include +#include typedef struct { @@ -365,7 +363,7 @@ e_pilot_map_read (const char *filename, EPilotMap **map) new_map->pid_map = g_hash_table_new (g_int_hash, g_int_equal); new_map->uid_map = g_hash_table_new (g_str_hash, g_str_equal); - if (g_file_exists (filename)) { + if (g_file_test (filename, G_FILE_TEST_EXISTS)) { if (xmlSAXUserParseFile (&handler, new_map, filename) < 0) { g_free (new_map); return -1; @@ -394,12 +392,12 @@ e_pilot_map_write (const char *filename, EPilotMap *map) g_warning ("Pilot map file could not be created\n"); return -1; } - doc->root = xmlNewDocNode(doc, NULL, "PilotMap", NULL); + xmlDocSetRootElement (doc, xmlNewDocNode(doc, NULL, "PilotMap", NULL)); map->since = time (NULL); - map_set_node_timet (doc->root, "timestamp", map->since); + map_set_node_timet (xmlDocGetRootElement (doc), "timestamp", map->since); wd.touched_only = map->write_touched_only; - wd.root = doc->root; + wd.root = xmlDocGetRootElement(doc); g_hash_table_foreach (map->uid_map, map_write_foreach, &wd); /* Write the file */ -- cgit