1 $NetBSD: patch-ab,v 1.1.1.1 2004/07/26 23:33:35 wiz Exp $
3 Drew Einhorn's gpsfetchmap.pl enhancements from:
5 http://s2.selwerd.nl/~dirk-jan/gpsdrive/archive/msg01772.html
7 also require this patch to support tree'd rather than flap map
10 --- src/gpsdrive.c.orig Sun Dec 8 09:43:33 2002
11 +++ src/gpsdrive.c Wed Jan 8 12:20:48 2003
12 @@ -2926,12 +2926,22 @@
14 for (i = 0; i < nrmaps; i++)
16 + /* strip off the path, we just want to check the filename */
23 + fullname = (maps + i)->filename;
24 + rslash = strrchr(fullname, '/');
25 + filename = rslash == NULL ? fullname : rslash + 1;
28 - if (!(strncmp ((maps + i)->filename, "map_", 4)))
29 + if (!(strncmp (filename, "map_", 4)))
32 - if (!(strncmp ((maps + i)->filename, "top_", 4)))
33 + if (!(strncmp (filename, "top_", 4)))
37 @@ -3101,8 +3111,17 @@
39 for (i = 0; i < nrmaps; i++)
41 - if ((strncmp ((maps + i)->filename, "map_", 4)))
42 - if ((strncmp ((maps + i)->filename, "top_", 4)))
43 + /* strip off the path, we just want to check the filename */
48 + fullname = (maps + i)->filename;
49 + rslash = strrchr(fullname, '/');
50 + filename = rslash == NULL ? fullname : rslash + 1;
52 + if ((strncmp (filename, "map_", 4)))
53 + if ((strncmp (filename, "top_", 4)))
56 error = g_string_new (NULL);