From: robertl Date: Thu, 13 Aug 2009 04:17:07 +0000 (+0000) Subject: Enhancements to Garmin GPI. X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~199^2~163 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3e30d69082063c1e5069d2823f49919361d212f6;p=gpsbabel.git Enhancements to Garmin GPI. --- diff --git a/garmin_gpi.c b/garmin_gpi.c index 739b0c94e..e01f5598d 100644 --- a/garmin_gpi.c +++ b/garmin_gpi.c @@ -438,7 +438,12 @@ read_poi_group(const int sz, const int tag) #endif } - +// TODO: 'tag' is probably not a 32 bit value. +// most likely it's a pair of 16's: the first pair is the tag number. +// if the second 16 is "eight", then it's an +// extended thingy and it has a 4-byte extended record length (total number +// of bytes for all record fields and all nested records, starting after the +// length field) /* gpi tag handler */ static int read_tag(const char *caller, const int tag, waypoint *wpt) @@ -562,9 +567,13 @@ read_tag(const char *caller, const int tag, waypoint *wpt) gmsd = gpi_gmsd_init(wpt); GMSD_SET(phone_nr, str); } - if ((mask & 2) && (str = gpi_read_string("Unknown 1"))) { + if ((mask & 2) && (str = gpi_read_string("Phone2"))) { + gmsd = gpi_gmsd_init(wpt); + GMSD_SET(phone_nr2, str); } - if ((mask & 4) && (str = gpi_read_string("Unknown 2"))) { + if ((mask & 4) && (str = gpi_read_string("Fax"))) { + gmsd = gpi_gmsd_init(wpt); + GMSD_SET(fax_nr, str); } if ((mask & 8) && (str = gpi_read_string("Email"))) { gmsd = gpi_gmsd_init(wpt);