summaryrefslogtreecommitdiffstats
path: root/parse-xml.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-24 12:05:16 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-24 12:05:16 -0800
commit100c4008099615b3db492a5da793c4d21641d1cb (patch)
treeedbd589b316b696ff6f41fb5b56ca5d5955b3c19 /parse-xml.c
parentd1262848d80d325605b5720961885f452426fb48 (diff)
parentc521aec88452460cc139d9d74d1f23ef58eac1a6 (diff)
downloadsubsurface-100c4008099615b3db492a5da793c4d21641d1cb.tar.gz
Merge branch 'webservice-import'
Update maxdepth / duration that have moved into the divecomputer structure. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'parse-xml.c')
-rw-r--r--parse-xml.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/parse-xml.c b/parse-xml.c
index 85b1c5306..ba5ca1e50 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -932,6 +932,22 @@ static degrees_t parse_degrees(char *buf, char **end)
return ret;
}
+static void gps_lat(char *buffer, void *_dive)
+{
+ char *end;
+ struct dive *dive = _dive;
+
+ dive->latitude = parse_degrees(buffer, &end);
+}
+
+static void gps_long(char *buffer, void *_dive)
+{
+ char *end;
+ struct dive *dive = _dive;
+
+ dive->longitude = parse_degrees(buffer, &end);
+}
+
static void gps_location(char *buffer, void *_dive)
{
char *end;
@@ -986,8 +1002,14 @@ static void try_to_fill_dive(struct dive *dive, const char *name, char *buf)
return;
if (MATCH(".gps", gps_location, dive))
return;
+ if (MATCH(".latitude", gps_lat, dive))
+ return;
+ if (MATCH(".longitude", gps_long, dive))
+ return;
if (MATCH(".location", utf8_string, &dive->location))
return;
+ if (MATCH(".name", utf8_string, &dive->location))
+ return;
if (MATCH(".suit", utf8_string, &dive->suit))
return;
if (MATCH(".divesuit", utf8_string, &dive->suit))