summaryrefslogtreecommitdiff
path: root/misc/gpsdrive/patches/patch-ab
diff options
context:
space:
mode:
Diffstat (limited to 'misc/gpsdrive/patches/patch-ab')
-rw-r--r--misc/gpsdrive/patches/patch-ab56
1 files changed, 56 insertions, 0 deletions
diff --git a/misc/gpsdrive/patches/patch-ab b/misc/gpsdrive/patches/patch-ab
new file mode 100644
index 00000000000..b8d23091515
--- /dev/null
+++ b/misc/gpsdrive/patches/patch-ab
@@ -0,0 +1,56 @@
+$NetBSD: patch-ab,v 1.1 2003/01/08 17:29:06 tsarna Exp $
+
+Drew Einhorn's gpsfetchmap.pl enhancements from:
+
+http://s2.selwerd.nl/~dirk-jan/gpsdrive/archive/msg01772.html
+
+also require this patch to support tree'd rather than flap map
+driectories.
+
+--- src/gpsdrive.c.orig Sun Dec 8 09:43:33 2002
++++ src/gpsdrive.c Wed Jan 8 12:20:48 2003
+@@ -2926,12 +2926,22 @@
+ }
+ for (i = 0; i < nrmaps; i++)
+ {
++ /* strip off the path, we just want to check the filename */
++ char *fullname;
++ char *rslash;
++ char *filename;
++
+ skip = TRUE;
++
++ fullname = (maps + i)->filename;
++ rslash = strrchr(fullname, '/');
++ filename = rslash == NULL ? fullname : rslash + 1;
++
+ if (displaymap_map)
+- if (!(strncmp ((maps + i)->filename, "map_", 4)))
++ if (!(strncmp (filename, "map_", 4)))
+ skip = FALSE;
+ if (displaymap_top)
+- if (!(strncmp ((maps + i)->filename, "top_", 4)))
++ if (!(strncmp (filename, "top_", 4)))
+ skip = FALSE;
+
+ if (skip)
+@@ -3101,8 +3111,17 @@
+
+ for (i = 0; i < nrmaps; i++)
+ {
+- if ((strncmp ((maps + i)->filename, "map_", 4)))
+- if ((strncmp ((maps + i)->filename, "top_", 4)))
++ /* strip off the path, we just want to check the filename */
++ char *fullname;
++ char *rslash;
++ char *filename;
++
++ fullname = (maps + i)->filename;
++ rslash = strrchr(fullname, '/');
++ filename = rslash == NULL ? fullname : rslash + 1;
++
++ if ((strncmp (filename, "map_", 4)))
++ if ((strncmp (filename, "top_", 4)))
+ {
+ GString *error;
+ error = g_string_new (NULL);