diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-21 11:35:06 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-21 11:35:06 -0800 |
commit | e5471e3fe8c870bb564481783af95babe93494f8 (patch) | |
tree | c2f2673650689e65705d3a5e186f3dfd991f0435 /parse-xml.c | |
parent | 61f3114fce0c188b989270a33e476db52b81e810 (diff) | |
download | subsurface-e5471e3fe8c870bb564481783af95babe93494f8.tar.gz |
Remove suunto parsing hacks from parse-xml.c
We can just depend on Miika's xslt transform instead.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'parse-xml.c')
-rw-r--r-- | parse-xml.c | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/parse-xml.c b/parse-xml.c index 64d79e022..b8f679324 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -110,7 +110,6 @@ static int cylinder_index; static enum import_source { UNKNOWN, LIBDIVECOMPUTER, - SUUNTO, UEMIS, DIVINGLOG, UDDF, @@ -644,26 +643,6 @@ static void try_to_fill_sample(struct sample *sample, const char *name, char *bu nonmatch("sample", name, buf); } -/* - * Crazy suunto xml. Look at how those o2/he things match up. - */ -static int suunto_dive_match(struct dive **divep, const char *name, int len, char *buf) -{ - struct dive *dive = *divep; - - return MATCH(".o2pct", percent, &dive->cylinder[0].gasmix.o2) || - MATCH(".hepct_0", percent, &dive->cylinder[0].gasmix.he) || - MATCH(".o2pct_2", percent, &dive->cylinder[1].gasmix.o2) || - MATCH(".hepct_1", percent, &dive->cylinder[1].gasmix.he) || - MATCH(".o2pct_3", percent, &dive->cylinder[2].gasmix.o2) || - MATCH(".hepct_2", percent, &dive->cylinder[2].gasmix.he) || - MATCH(".o2pct_4", percent, &dive->cylinder[3].gasmix.o2) || - MATCH(".hepct_3", percent, &dive->cylinder[3].gasmix.he) || - MATCH(".cylindersize", cylindersize, &dive->cylinder[0].type.size) || - MATCH(".cylinderworkpressure", pressure, &dive->cylinder[0].type.workingpressure) || - 0; -} - static const char *country, *city; static void divinglog_place(char *place, void *_location) @@ -978,11 +957,6 @@ static void try_to_fill_dive(struct dive **divep, const char *name, char *buf) start_match("dive", name, buf); switch (import_source) { - case SUUNTO: - if (suunto_dive_match(divep, name, len, buf)) - return; - break; - case UEMIS: if (uemis_dive_match(divep, name, len, buf)) return; @@ -1180,7 +1154,7 @@ static void sanitize_cylinder_type(cylinder_type_t *type) if (!type->size.mliter) return; - if (input_units.volume == CUFT || import_source == SUUNTO) { + if (input_units.volume == CUFT) { /* confusing - we don't really start from ml but millicuft !*/ volume_of_air = cuft_to_l(type->size.mliter); atm = to_ATM(type->workingpressure); /* working pressure in atm */ @@ -1348,12 +1322,6 @@ static void visit(xmlNode *n) traverse(n->children); } -static void suunto_importer(void) -{ - import_source = SUUNTO; - input_units = SI_units; -} - static void uemis_importer(void) { import_source = UEMIS; @@ -1405,7 +1373,6 @@ static struct nesting { { "P", sample_start, sample_end }, /* Import type recognition */ - { "SUUNTO", suunto_importer }, { "Divinglog", DivingLog_importer }, { "pre_dive", uemis_importer }, { "dives", uemis_importer }, |