From 15edba9ab0c50cbd5ee8654c6a0383052d66838f Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 30 Nov 2012 13:56:10 -0700 Subject: Remove the hack to mark parsed XML files as downloaded This was necessary for the Uemis downloader when we used the SDA file format as intermediary data format and imported that as XML buffer. Signed-off-by: Dirk Hohndel --- dive.h | 2 +- file.c | 4 ++-- parse-xml.c | 5 +---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/dive.h b/dive.h index e03399ec1..0e358b35f 100644 --- a/dive.h +++ b/dive.h @@ -426,7 +426,7 @@ static inline struct dive *get_dive_by_diveid(int diveid, int deviceid) for ((_i) = 0; ((_x) = get_dive(_i)) != NULL; (_i)++) extern void parse_xml_init(void); -extern void parse_xml_buffer(const char *url, const char *buf, int size, gboolean downloaded, GError **error); +extern void parse_xml_buffer(const char *url, const char *buf, int size, GError **error); extern void parse_xml_exit(void); extern void set_filename(const char *filename, gboolean force); diff --git a/file.c b/file.c index ac5bf2790..ecbc53df8 100644 --- a/file.c +++ b/file.c @@ -72,7 +72,7 @@ static void suunto_read(struct zip_file *file, GError **error) size = read * 3 / 2; mem = realloc(mem, size); } - parse_xml_buffer(_("SDE file"), mem, read, FALSE, error); + parse_xml_buffer(_("SDE file"), mem, read, error); free(mem); } #endif @@ -246,7 +246,7 @@ static void parse_file_buffer(const char *filename, struct memblock *mem, GError if (fmt && open_by_filename(filename, fmt+1, mem, error)) return; - parse_xml_buffer(filename, mem->buffer, mem->size, FALSE, error); + parse_xml_buffer(filename, mem->buffer, mem->size, error); } void parse_file(const char *filename, GError **error, gboolean possible_default_filename) diff --git a/parse-xml.c b/parse-xml.c index 960011ddf..9226aa63d 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -168,7 +168,6 @@ static struct { } cur_event; static struct tm cur_tm; static int cur_cylinder_index, cur_ws_index; -static gboolean from_download; static enum import_source { UNKNOWN, @@ -949,7 +948,6 @@ static void dive_start(void) add_dive_to_trip(cur_dive, cur_trip); cur_dive->tripflag = IN_TRIP; } - cur_dive->downloaded = from_download; } static void dive_end(void) @@ -1267,10 +1265,9 @@ static void reset_all(void) import_source = UNKNOWN; } -void parse_xml_buffer(const char *url, const char *buffer, int size, gboolean downloaded, GError **error) +void parse_xml_buffer(const char *url, const char *buffer, int size, GError **error) { xmlDoc *doc; - from_download = downloaded; doc = xmlReadMemory(buffer, size, url, NULL, 0); if (!doc) { -- cgit v1.2.3-70-g09d2