From ccc9d800153ad11d8a2b54dc75fe8aefb5650dd3 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 16 Jun 2015 12:52:39 -0700 Subject: Remove all the no longer necessary code that aborts read of first V2 file This was a poorly implemented hack when we executed the reverse geo lookup in the main thread and opening a V2 file could take a very long time. We need to do the "Welcome" message quite differently. Signed-off-by: Dirk Hohndel --- parse-xml.c | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'parse-xml.c') diff --git a/parse-xml.c b/parse-xml.c index b00ce10a9..345bf61ed 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -22,9 +22,6 @@ int verbose, quit; int metric = 1; int last_xml_version = -1; -bool abort_read_of_old_file = false; -bool v2_question_shown = false; -bool imported_via_xslt = false; static xmlDoc *test_xslt_transforms(xmlDoc *doc, const char **params); @@ -1718,14 +1715,6 @@ static bool entry(const char *name, char *buf) if (!strncmp(name, "version.program", sizeof("version.program") - 1) || !strncmp(name, "version.divelog", sizeof("version.divelog") - 1)) { last_xml_version = atoi(buf); - if (last_xml_version < 3 && !v2_question_shown && !imported_via_xslt) { - // let's ask the user what they want to do about reverse geo coding - // and warn them that opening older XML files can take a while - // since C code shouldn't call the UI we set a global flag and bail - // from reading the file for now - abort_read_of_old_file = true; - return false; - } } if (in_userid) { try_to_fill_userid(name, buf); @@ -1996,7 +1985,6 @@ int parse_xml_buffer(const char *url, const char *buffer, int size, } dive_end(); xmlFreeDoc(doc); - imported_via_xslt = false; return ret; } @@ -3213,7 +3201,6 @@ static xmlDoc *test_xslt_transforms(xmlDoc *doc, const char **params) } free((void *)attribute); } - imported_via_xslt = true; xmlSubstituteEntitiesDefault(1); xslt = get_stylesheet(info->file); if (xslt == NULL) { -- cgit v1.2.3-70-g09d2