[PATCH 2/3] xml-parsing: accept 'sitelat' and 'sitelon' for GPS coordinates

Linus Torvalds torvalds at linux-foundation.org
Mon Jan 28 21:21:47 PST 2013


From: Linus Torvalds <torvalds at linux-foundation.org>
Date: Mon, 28 Jan 2013 21:11:01 -0800
Subject: [PATCH 2/3] xml-parsing: accept 'sitelat' and 'sitelon' for GPS coordinates

Are they ugly and insane tags? Yes.  Are they used? Bingo.  MacDive uses
this lovely format for specifying dive site location.

Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---
 parse-xml.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/parse-xml.c b/parse-xml.c
index e2f84f073a81..765843fbc56e 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -1004,8 +1004,12 @@ static void try_to_fill_dive(struct dive *dive, const char *name, char *buf)
 		return;
 	if (MATCH(".latitude", gps_lat, dive))
 		return;
+	if (MATCH(".sitelat", gps_lat, dive))
+		return;
 	if (MATCH(".longitude", gps_long, dive))
 		return;
+	if (MATCH(".sitelon", gps_long, dive))
+		return;
 	if (MATCH(".location", utf8_string, &dive->location))
 		return;
 	if (MATCH("dive.name", utf8_string, &dive->location))
-- 
1.8.1.2.422.g08c0e7f



More information about the subsurface mailing list