diff options
author | JP Rosevear <jpr@helixcode.com> | 2000-09-21 00:38:16 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2000-09-21 00:38:16 +0800 |
commit | e6c1d16b60384de66e05598967c11647e3a31ad0 (patch) | |
tree | 5c07e88e9777c1f48621dcf92b3868f135c19a3c /calendar/conduits/todo | |
parent | 30392b4e49833a64ae612f3b55c6e220cbe24bd2 (diff) | |
download | gsoc2013-evolution-e6c1d16b60384de66e05598967c11647e3a31ad0.tar gsoc2013-evolution-e6c1d16b60384de66e05598967c11647e3a31ad0.tar.gz gsoc2013-evolution-e6c1d16b60384de66e05598967c11647e3a31ad0.tar.bz2 gsoc2013-evolution-e6c1d16b60384de66e05598967c11647e3a31ad0.tar.lz gsoc2013-evolution-e6c1d16b60384de66e05598967c11647e3a31ad0.tar.xz gsoc2013-evolution-e6c1d16b60384de66e05598967c11647e3a31ad0.tar.zst gsoc2013-evolution-e6c1d16b60384de66e05598967c11647e3a31ad0.zip |
Use a local sax handler.
2000-09-20 JP Rosevear <jpr@helixcode.com>
* pcs/cal-backend.c (cal_backend_get_log_entries): Use a local
sax handler.
* conduits/todo/todo-conduit.c (pre_sync): Use xmlSAXParseFile
(map_sax_parse): Delete
svn path=/trunk/; revision=5524
Diffstat (limited to 'calendar/conduits/todo')
-rw-r--r-- | calendar/conduits/todo/todo-conduit.c | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c index 6b9659f70f..f456b6e81d 100644 --- a/calendar/conduits/todo/todo-conduit.c +++ b/calendar/conduits/todo/todo-conduit.c @@ -186,36 +186,6 @@ map_sax_start_element (void *data, const xmlChar *name, } } -static int -map_sax_parse (xmlSAXHandler *handler, EToDoConduitContext *ctxt, const char *filename) -{ - int ret = 0; - xmlParserCtxtPtr xc; - - if (!g_file_exists (filename)) - return 0; - - xc = xmlCreateFileParserCtxt (filename); - if (xc == NULL) - return -1; - - xc->sax = handler; - xc->userData = (void *)ctxt; - - xmlParseDocument (xc); - - if (xc->wellFormed) - ret = 0; - else - ret = -1; - - if (handler != NULL) - xc->sax = NULL; - xmlFreeParserCtxt(xc); - - return ret; -} - static void map_write_foreach (gpointer key, gpointer value, gpointer data) { @@ -615,9 +585,8 @@ pre_sync (GnomePilotConduit *conduit, handler.startElement = map_sax_start_element; filename = map_name (ctxt); - ret = map_sax_parse (&handler, ctxt, filename); - if (ret < 0) - return ret; + if (xmlSAXUserParseFile (&logSAXParser, ctxt, filename) < 0) + return -1; g_free (filename); |