Problems converting Garmin custom waypoint symbol names

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems converting Garmin custom waypoint symbol names

Dr Rainer Woitok
Greetings,

asking GPSBabel  to convert a  Garmin "*.gdb" file  containing waypoints
with custom waypoint symbols, I am receiving error messages like

   QString::arg: Argument missing: "Custom %d" , 0

To nail the problem down, I created a test file containing just a single
waypoint (see attachment).  Here are the gory details:

Garmin MapSource recently updated to 6.15.11, running on Windows Vista.

GPSBabel 1.5.2, running on Windows Vista in a Cygwin terminal window.

First I used MapSource to create a new file "Waypoint-Custom-0.gdb" con-
taining a single waypoint "WP001"  at approximately N0.0 E0.0,  and dis-
playing it  using waypoint  symbol "Custom 0".   Again using MapSource I
then created two copies of this file,  "Waypoint-Custom-1.gdb" and "Way-
point-Custom-3.gdb",  containing the same waypoint but displaying it us-
ing waypoint symbols "Custom 1" and "Custom 3", respectively:

$ ls -l W*.gdb
-rwxr-xr-x 1 Rainer none 153 2015-03-25 11:16 Waypoint-Custom-0.gdb
-rwxr-xr-x 1 Rainer none 153 2015-03-25 11:17 Waypoint-Custom-1.gdb
-rwxr-xr-x 1 Rainer none 153 2015-03-25 11:17 Waypoint-Custom-3.gdb
$

As can be seen here, these three files are identical except for the byte
at position 112 which obviously codes the waypoint symbol to be used:

$ od -Ad -tx1a Waypoint-Custom-0.gdb > Waypoint-Custom-0.od
$ od -Ad -tx1a Waypoint-Custom-1.gdb > Waypoint-Custom-1.od
$ od -Ad -tx1a Waypoint-Custom-3.gdb > Waypoint-Custom-3.od
$ cat Waypoint-Custom-0.od
0000000  4d  73  52  63  66  00  02  00  00  00  44  6d  00  1b  00  00
          M   s   R   c   f nul stx nul nul nul   D   m nul esc nul nul
0000016  00  41  67  02  73  71  61  00  4a  61  6e  20  32  36  20  32
        nul   A   g stx   s   q   a nul   J   a   n  sp   2   6  sp   2
0000032  30  31  30  00  31  31  3a  33  31  3a  30  36  00  4d  61  70
          0   1   0 nul   1   1   :   3   1   :   0   6 nul   M   a   p
0000048  53  6f  75  72  63  65  00  56  00  00  00  57  57  50  30  30
          S   o   u   r   c   e nul   V nul nul nul   W   W   P   0   0
0000064  31  00  00  00  00  00  00  00  00  00  00  ff  ff  ff  ff  ff
          1 nul nul nul nul nul nul nul nul nul nul del del del del del
0000080  ff  ff  ff  ff  ff  ff  ff  00  00  ff  ff  ff  ff  0c  01  00
        del del del del del del del nul nul del del del del  ff soh nul
0000096  00  47  01  00  00  00  00  00  01  00  00  00  00  00  00  00
        nul   G soh nul nul nul nul nul soh nul nul nul nul nul nul nul
0000112  f4  01  00  00  00  00  00  00  00  00  00  00  00  00  00  00
          t soh nul nul nul nul nul nul nul nul nul nul nul nul nul nul
0000128  00  00  00  00  00  00  00  01  3a  79  12  55  00  00  00  00
        nul nul nul nul nul nul nul soh   :   y dc2   U nul nul nul nul
0000144  00  00  02  00  00  00  56  00  01
        nul nul stx nul nul nul   V nul soh
0000153
$ diff -du Waypoint-Custom-0.od Waypoint-Custom-1.od
--- Waypoint-Custom-0.od 2015-03-25 12:21:31.309000000 +0100
+++ Waypoint-Custom-1.od 2015-03-25 12:21:43.371000000 +0100
@@ -12,8 +12,8 @@
         del del del del del del del nul nul del del del del  ff soh nul
 0000096  00  47  01  00  00  00  00  00  01  00  00  00  00  00  00  00
         nul   G soh nul nul nul nul nul soh nul nul nul nul nul nul nul
-0000112  f4  01  00  00  00  00  00  00  00  00  00  00  00  00  00  00
-          t soh nul nul nul nul nul nul nul nul nul nul nul nul nul nul
+0000112  f5  01  00  00  00  00  00  00  00  00  00  00  00  00  00  00
+          u soh nul nul nul nul nul nul nul nul nul nul nul nul nul nul
 0000128  00  00  00  00  00  00  00  01  3a  79  12  55  00  00  00  00
         nul nul nul nul nul nul nul soh   :   y dc2   U nul nul nul nul
 0000144  00  00  02  00  00  00  56  00  01
$ diff -du Waypoint-Custom-0.od Waypoint-Custom-3.od
--- Waypoint-Custom-0.od 2015-03-25 12:21:31.309000000 +0100
+++ Waypoint-Custom-3.od 2015-03-25 12:21:47.948000000 +0100
@@ -12,8 +12,8 @@
         del del del del del del del nul nul del del del del  ff soh nul
 0000096  00  47  01  00  00  00  00  00  01  00  00  00  00  00  00  00
         nul   G soh nul nul nul nul nul soh nul nul nul nul nul nul nul
-0000112  f4  01  00  00  00  00  00  00  00  00  00  00  00  00  00  00
-          t soh nul nul nul nul nul nul nul nul nul nul nul nul nul nul
+0000112  f7  01  00  00  00  00  00  00  00  00  00  00  00  00  00  00
+          w soh nul nul nul nul nul nul nul nul nul nul nul nul nul nul
 0000128  00  00  00  00  00  00  00  01  3a  79  12  55  00  00  00  00
         nul nul nul nul nul nul nul soh   :   y dc2   U nul nul nul nul
 0000144  00  00  02  00  00  00  56  00  01
$

Finally, I asked GPSBabel to convert these three "*.gdb" files:

$ gpsbabel -i gdb -f Waypoint-Custom-0.gdb -o gpx -F Waypoint-Custom-0.gpx
QString::arg: Argument missing: "Custom %d" , 0
$ gpsbabel -i gdb -f Waypoint-Custom-1.gdb -o gpx -F Waypoint-Custom-1.gpx
QString::arg: Argument missing: "Custom %d" , 1
$ gpsbabel -i gdb -f Waypoint-Custom-3.gdb -o gpx -F Waypoint-Custom-3.gpx
QString::arg: Argument missing: "Custom %d" , 3
$

The target files produced by GPSBabel are identical, except for the cre-
ation time stamps,  and the waypoint symbol is  "Custom %d" in all three
cases:

$ cat Waypoint-Custom-0.gpx
<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.0" creator="GPSBabel - http://www.gpsbabel.org" xmlns="http://www.topografix.com/GPX/1/0">
  <time>2015-03-25T10:18:56.654Z</time>
  <bounds minlat="0.000022464" minlon="0.000027409" maxlat="0.000022464" maxlon="0.000027409"/>
  <wpt lat="0.000022464" lon="0.000027409">
    <time>2015-03-25T10:15:42Z</time>
    <name>WP001</name>
    <cmt>WP001</cmt>
    <desc>WP001</desc>
    <sym>Custom %d</sym>
  </wpt>
</gpx>
$ diff -du Waypoint-Custom-0.gpx Waypoint-Custom-1.gpx
--- Waypoint-Custom-0.gpx 2015-03-25 11:18:56.654000000 +0100
+++ Waypoint-Custom-1.gpx 2015-03-25 11:19:15.996000000 +0100
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <gpx version="1.0" creator="GPSBabel - http://www.gpsbabel.org" xmlns="http://www.topografix.com/GPX/1/0">
-  <time>2015-03-25T10:18:56.654Z</time>
+  <time>2015-03-25T10:19:15.996Z</time>
   <bounds minlat="0.000022464" minlon="0.000027409" maxlat="0.000022464" maxlon="0.000027409"/>
   <wpt lat="0.000022464" lon="0.000027409">
     <time>2015-03-25T10:15:42Z</time>
$ diff -du Waypoint-Custom-0.gpx Waypoint-Custom-3.gpx
--- Waypoint-Custom-0.gpx 2015-03-25 11:18:56.654000000 +0100
+++ Waypoint-Custom-3.gpx 2015-03-25 11:19:26.021000000 +0100
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <gpx version="1.0" creator="GPSBabel - http://www.gpsbabel.org" xmlns="http://www.topografix.com/GPX/1/0">
-  <time>2015-03-25T10:18:56.654Z</time>
+  <time>2015-03-25T10:19:26.021Z</time>
   <bounds minlat="0.000022464" minlon="0.000027409" maxlat="0.000022464" maxlon="0.000027409"/>
   <wpt lat="0.000022464" lon="0.000027409">
     <time>2015-03-25T10:15:42Z</time>
$

So it seems  GPSBabel is correctly interpreting  the waypoint symbol in-
formation in the "*.gdb" file  but then incorrectly calls "QString::arg"
to turn this  information into a  meaningful string.   Can somebody mend
this soon, please?

Sincerely,
  Rainer

PS: Does the GPX syntax allow  the text in a waypoint's "<sym>...</sym>"
clause to specify a URL pointing to a "*.bmp" or "*.jpg" file to be used
to display the corresponding waypoint (for instance via "<link href=...>
<text>...</text></link>)?  And if so, is there a way to tell GPSBabel to
use some sort  of conversion table to include  such URLs in the waypoint
specifications in a "*.gpx" file?

 ----------------------------------------------------------------------
| Rainer M Woitok                | Phone : (+49 60 93) 487 95 95       |
| Kolpingstraße 3                | Mobile: (+49 172) 813 6 831         |
| D-63846 Laufach                | Mail  : [hidden email]     |
| Germany                        |                                     |
 ----------------------------------------------------------------------


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc

Waypoint-Custom-0.gdb (208 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Problems converting Garmin custom waypoint symbol names

tsteven4-2
Rainer,

The bug you reported is fixed in https://code.google.com/p/gpsbabel/source/detail?r=4985
Your postscript question remains unanswered.

Steve

~/work/gc/ref% ./gpsbabel -i gdb -f Waypoint-Custom-0.gdb -o gpx -F -
<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.0" creator="GPSBabel - http://www.gpsbabel.org" xmlns="http://www.topografix.com/GPX/1/0">
  <time>2015-04-01T13:17:09.296Z</time>
  <bounds minlat="0.000022464" minlon="0.000027409" maxlat="0.000022464" maxlon="0.000027409"/>
  <wpt lat="0.000022464" lon="0.000027409">
    <time>2015-03-25T09:00:42Z</time>
    <name>WP001</name>
    <cmt>WP001</cmt>
    <desc>WP001</desc>
    <sym>Custom 0</sym>
  </wpt>
</gpx>


On 4/1/2015 6:26 AM, Dr Rainer Woitok wrote:
Greetings,

asking GPSBabel  to convert a  Garmin "*.gdb" file  containing waypoints
with custom waypoint symbols, I am receiving error messages like

   QString::arg: Argument missing: "Custom %d" , 0

To nail the problem down, I created a test file containing just a single
waypoint (see attachment).  Here are the gory details:

Garmin MapSource recently updated to 6.15.11, running on Windows Vista.

GPSBabel 1.5.2, running on Windows Vista in a Cygwin terminal window.

First I used MapSource to create a new file "Waypoint-Custom-0.gdb" con-
taining a single waypoint "WP001"  at approximately N0.0 E0.0,  and dis-
playing it  using waypoint  symbol "Custom 0".   Again using MapSource I
then created two copies of this file,  "Waypoint-Custom-1.gdb" and "Way-
point-Custom-3.gdb",  containing the same waypoint but displaying it us-
ing waypoint symbols "Custom 1" and "Custom 3", respectively:

$ ls -l W*.gdb
-rwxr-xr-x 1 Rainer none 153 2015-03-25 11:16 Waypoint-Custom-0.gdb
-rwxr-xr-x 1 Rainer none 153 2015-03-25 11:17 Waypoint-Custom-1.gdb
-rwxr-xr-x 1 Rainer none 153 2015-03-25 11:17 Waypoint-Custom-3.gdb
$

As can be seen here, these three files are identical except for the byte
at position 112 which obviously codes the waypoint symbol to be used:

$ od -Ad -tx1a Waypoint-Custom-0.gdb > Waypoint-Custom-0.od
$ od -Ad -tx1a Waypoint-Custom-1.gdb > Waypoint-Custom-1.od
$ od -Ad -tx1a Waypoint-Custom-3.gdb > Waypoint-Custom-3.od
$ cat Waypoint-Custom-0.od
0000000  4d  73  52  63  66  00  02  00  00  00  44  6d  00  1b  00  00
          M   s   R   c   f nul stx nul nul nul   D   m nul esc nul nul
0000016  00  41  67  02  73  71  61  00  4a  61  6e  20  32  36  20  32
        nul   A   g stx   s   q   a nul   J   a   n  sp   2   6  sp   2
0000032  30  31  30  00  31  31  3a  33  31  3a  30  36  00  4d  61  70
          0   1   0 nul   1   1   :   3   1   :   0   6 nul   M   a   p
0000048  53  6f  75  72  63  65  00  56  00  00  00  57  57  50  30  30
          S   o   u   r   c   e nul   V nul nul nul   W   W   P   0   0
0000064  31  00  00  00  00  00  00  00  00  00  00  ff  ff  ff  ff  ff
          1 nul nul nul nul nul nul nul nul nul nul del del del del del
0000080  ff  ff  ff  ff  ff  ff  ff  00  00  ff  ff  ff  ff  0c  01  00
        del del del del del del del nul nul del del del del  ff soh nul
0000096  00  47  01  00  00  00  00  00  01  00  00  00  00  00  00  00
        nul   G soh nul nul nul nul nul soh nul nul nul nul nul nul nul
0000112  f4  01  00  00  00  00  00  00  00  00  00  00  00  00  00  00
          t soh nul nul nul nul nul nul nul nul nul nul nul nul nul nul
0000128  00  00  00  00  00  00  00  01  3a  79  12  55  00  00  00  00
        nul nul nul nul nul nul nul soh   :   y dc2   U nul nul nul nul
0000144  00  00  02  00  00  00  56  00  01
        nul nul stx nul nul nul   V nul soh
0000153
$ diff -du Waypoint-Custom-0.od Waypoint-Custom-1.od 
--- Waypoint-Custom-0.od	2015-03-25 12:21:31.309000000 +0100
+++ Waypoint-Custom-1.od	2015-03-25 12:21:43.371000000 +0100
@@ -12,8 +12,8 @@
         del del del del del del del nul nul del del del del  ff soh nul
 0000096  00  47  01  00  00  00  00  00  01  00  00  00  00  00  00  00
         nul   G soh nul nul nul nul nul soh nul nul nul nul nul nul nul
-0000112  f4  01  00  00  00  00  00  00  00  00  00  00  00  00  00  00
-          t soh nul nul nul nul nul nul nul nul nul nul nul nul nul nul
+0000112  f5  01  00  00  00  00  00  00  00  00  00  00  00  00  00  00
+          u soh nul nul nul nul nul nul nul nul nul nul nul nul nul nul
 0000128  00  00  00  00  00  00  00  01  3a  79  12  55  00  00  00  00
         nul nul nul nul nul nul nul soh   :   y dc2   U nul nul nul nul
 0000144  00  00  02  00  00  00  56  00  01
$ diff -du Waypoint-Custom-0.od Waypoint-Custom-3.od 
--- Waypoint-Custom-0.od	2015-03-25 12:21:31.309000000 +0100
+++ Waypoint-Custom-3.od	2015-03-25 12:21:47.948000000 +0100
@@ -12,8 +12,8 @@
         del del del del del del del nul nul del del del del  ff soh nul
 0000096  00  47  01  00  00  00  00  00  01  00  00  00  00  00  00  00
         nul   G soh nul nul nul nul nul soh nul nul nul nul nul nul nul
-0000112  f4  01  00  00  00  00  00  00  00  00  00  00  00  00  00  00
-          t soh nul nul nul nul nul nul nul nul nul nul nul nul nul nul
+0000112  f7  01  00  00  00  00  00  00  00  00  00  00  00  00  00  00
+          w soh nul nul nul nul nul nul nul nul nul nul nul nul nul nul
 0000128  00  00  00  00  00  00  00  01  3a  79  12  55  00  00  00  00
         nul nul nul nul nul nul nul soh   :   y dc2   U nul nul nul nul
 0000144  00  00  02  00  00  00  56  00  01
$

Finally, I asked GPSBabel to convert these three "*.gdb" files:

$ gpsbabel -i gdb -f Waypoint-Custom-0.gdb -o gpx -F Waypoint-Custom-0.gpx
QString::arg: Argument missing: "Custom %d" , 0 
$ gpsbabel -i gdb -f Waypoint-Custom-1.gdb -o gpx -F Waypoint-Custom-1.gpx
QString::arg: Argument missing: "Custom %d" , 1 
$ gpsbabel -i gdb -f Waypoint-Custom-3.gdb -o gpx -F Waypoint-Custom-3.gpx
QString::arg: Argument missing: "Custom %d" , 3 
$

The target files produced by GPSBabel are identical, except for the cre-
ation time stamps,  and the waypoint symbol is  "Custom %d" in all three
cases:

$ cat Waypoint-Custom-0.gpx
<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.0" creator="GPSBabel - http://www.gpsbabel.org" xmlns="http://www.topografix.com/GPX/1/0">
  <time>2015-03-25T10:18:56.654Z</time>
  <bounds minlat="0.000022464" minlon="0.000027409" maxlat="0.000022464" maxlon="0.000027409"/>
  <wpt lat="0.000022464" lon="0.000027409">
    <time>2015-03-25T10:15:42Z</time>
    <name>WP001</name>
    <cmt>WP001</cmt>
    <desc>WP001</desc>
    <sym>Custom %d</sym>
  </wpt>
</gpx>
$ diff -du Waypoint-Custom-0.gpx Waypoint-Custom-1.gpx 
--- Waypoint-Custom-0.gpx	2015-03-25 11:18:56.654000000 +0100
+++ Waypoint-Custom-1.gpx	2015-03-25 11:19:15.996000000 +0100
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <gpx version="1.0" creator="GPSBabel - http://www.gpsbabel.org" xmlns="http://www.topografix.com/GPX/1/0">
-  <time>2015-03-25T10:18:56.654Z</time>
+  <time>2015-03-25T10:19:15.996Z</time>
   <bounds minlat="0.000022464" minlon="0.000027409" maxlat="0.000022464" maxlon="0.000027409"/>
   <wpt lat="0.000022464" lon="0.000027409">
     <time>2015-03-25T10:15:42Z</time>
$ diff -du Waypoint-Custom-0.gpx Waypoint-Custom-3.gpx 
--- Waypoint-Custom-0.gpx	2015-03-25 11:18:56.654000000 +0100
+++ Waypoint-Custom-3.gpx	2015-03-25 11:19:26.021000000 +0100
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <gpx version="1.0" creator="GPSBabel - http://www.gpsbabel.org" xmlns="http://www.topografix.com/GPX/1/0">
-  <time>2015-03-25T10:18:56.654Z</time>
+  <time>2015-03-25T10:19:26.021Z</time>
   <bounds minlat="0.000022464" minlon="0.000027409" maxlat="0.000022464" maxlon="0.000027409"/>
   <wpt lat="0.000022464" lon="0.000027409">
     <time>2015-03-25T10:15:42Z</time>
$

So it seems  GPSBabel is correctly interpreting  the waypoint symbol in-
formation in the "*.gdb" file  but then incorrectly calls "QString::arg"
to turn this  information into a  meaningful string.   Can somebody mend
this soon, please?

Sincerely,
  Rainer

PS: Does the GPX syntax allow  the text in a waypoint's "<sym>...</sym>"
clause to specify a URL pointing to a "*.bmp" or "*.jpg" file to be used
to display the corresponding waypoint (for instance via "<link href=...>
<text>...</text></link>)?  And if so, is there a way to tell GPSBabel to
use some sort  of conversion table to include  such URLs in the waypoint
specifications in a "*.gpx" file?

 ----------------------------------------------------------------------
| Rainer M Woitok                | Phone : (+49 60 93) 487 95 95       |
| Kolpingstraße 3                | Mobile: (+49 172) 813 6 831         |
| D-63846 Laufach                | Mail  : [hidden email]     |
| Germany                        |                                     |
 ----------------------------------------------------------------------



------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/


_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|

Re: Problems converting Garmin custom waypoint symbol names

Robert Lipe-4
In reply to this post by Dr Rainer Woitok
Thanx for the good description.  I'm committing a fix now to garmin_tables.cc.

On Wed, Apr 1, 2015 at 7:26 AM, Dr Rainer Woitok <[hidden email]> wrote:
Greetings,

asking GPSBabel  to convert a  Garmin "*.gdb" file  containing waypoints
with custom waypoint symbols, I am receiving error messages like

   QString::arg: Argument missing: "Custom %d" , 0

To nail the problem down, I created a test file containing just a single
waypoint (see attachment).  Here are the gory details:

Garmin MapSource recently updated to 6.15.11, running on Windows Vista.

GPSBabel 1.5.2, running on Windows Vista in a Cygwin terminal window.

First I used MapSource to create a new file "Waypoint-Custom-0.gdb" con-
taining a single waypoint "WP001"  at approximately N0.0 E0.0,  and dis-
playing it  using waypoint  symbol "Custom 0".   Again using MapSource I
then created two copies of this file,  "Waypoint-Custom-1.gdb" and "Way-
point-Custom-3.gdb",  containing the same waypoint but displaying it us-
ing waypoint symbols "Custom 1" and "Custom 3", respectively:

$ ls -l W*.gdb
-rwxr-xr-x 1 Rainer none 153 2015-03-25 11:16 Waypoint-Custom-0.gdb
-rwxr-xr-x 1 Rainer none 153 2015-03-25 11:17 Waypoint-Custom-1.gdb
-rwxr-xr-x 1 Rainer none 153 2015-03-25 11:17 Waypoint-Custom-3.gdb
$

As can be seen here, these three files are identical except for the byte
at position 112 which obviously codes the waypoint symbol to be used:

$ od -Ad -tx1a Waypoint-Custom-0.gdb > Waypoint-Custom-0.od
$ od -Ad -tx1a Waypoint-Custom-1.gdb > Waypoint-Custom-1.od
$ od -Ad -tx1a Waypoint-Custom-3.gdb > Waypoint-Custom-3.od
$ cat Waypoint-Custom-0.od
0000000  4d  73  52  63  66  00  02  00  00  00  44  6d  00  1b  00  00
          M   s   R   c   f nul stx nul nul nul   D   m nul esc nul nul
0000016  00  41  67  02  73  71  61  00  4a  61  6e  20  32  36  20  32
        nul   A   g stx   s   q   a nul   J   a   n  sp   2   6  sp   2
0000032  30  31  30  00  31  31  3a  33  31  3a  30  36  00  4d  61  70
          0   1   0 nul   1   1   :   3   1   :   0   6 nul   M   a   p
0000048  53  6f  75  72  63  65  00  56  00  00  00  57  57  50  30  30
          S   o   u   r   c   e nul   V nul nul nul   W   W   P   0   0
0000064  31  00  00  00  00  00  00  00  00  00  00  ff  ff  ff  ff  ff
          1 nul nul nul nul nul nul nul nul nul nul del del del del del
0000080  ff  ff  ff  ff  ff  ff  ff  00  00  ff  ff  ff  ff  0c  01  00
        del del del del del del del nul nul del del del del  ff soh nul
0000096  00  47  01  00  00  00  00  00  01  00  00  00  00  00  00  00
        nul   G soh nul nul nul nul nul soh nul nul nul nul nul nul nul
0000112  f4  01  00  00  00  00  00  00  00  00  00  00  00  00  00  00
          t soh nul nul nul nul nul nul nul nul nul nul nul nul nul nul
0000128  00  00  00  00  00  00  00  01  3a  79  12  55  00  00  00  00
        nul nul nul nul nul nul nul soh   :   y dc2   U nul nul nul nul
0000144  00  00  02  00  00  00  56  00  01
        nul nul stx nul nul nul   V nul soh
0000153
$ diff -du Waypoint-Custom-0.od Waypoint-Custom-1.od
--- Waypoint-Custom-0.od        2015-03-25 12:21:31.309000000 +0100
+++ Waypoint-Custom-1.od        2015-03-25 12:21:43.371000000 +0100
@@ -12,8 +12,8 @@
         del del del del del del del nul nul del del del del  ff soh nul
 0000096  00  47  01  00  00  00  00  00  01  00  00  00  00  00  00  00
         nul   G soh nul nul nul nul nul soh nul nul nul nul nul nul nul
-0000112  f4  01  00  00  00  00  00  00  00  00  00  00  00  00  00  00
-          t soh nul nul nul nul nul nul nul nul nul nul nul nul nul nul
+0000112  f5  01  00  00  00  00  00  00  00  00  00  00  00  00  00  00
+          u soh nul nul nul nul nul nul nul nul nul nul nul nul nul nul
 0000128  00  00  00  00  00  00  00  01  3a  79  12  55  00  00  00  00
         nul nul nul nul nul nul nul soh   :   y dc2   U nul nul nul nul
 0000144  00  00  02  00  00  00  56  00  01
$ diff -du Waypoint-Custom-0.od Waypoint-Custom-3.od
--- Waypoint-Custom-0.od        2015-03-25 12:21:31.309000000 +0100
+++ Waypoint-Custom-3.od        2015-03-25 12:21:47.948000000 +0100
@@ -12,8 +12,8 @@
         del del del del del del del nul nul del del del del  ff soh nul
 0000096  00  47  01  00  00  00  00  00  01  00  00  00  00  00  00  00
         nul   G soh nul nul nul nul nul soh nul nul nul nul nul nul nul
-0000112  f4  01  00  00  00  00  00  00  00  00  00  00  00  00  00  00
-          t soh nul nul nul nul nul nul nul nul nul nul nul nul nul nul
+0000112  f7  01  00  00  00  00  00  00  00  00  00  00  00  00  00  00
+          w soh nul nul nul nul nul nul nul nul nul nul nul nul nul nul
 0000128  00  00  00  00  00  00  00  01  3a  79  12  55  00  00  00  00
         nul nul nul nul nul nul nul soh   :   y dc2   U nul nul nul nul
 0000144  00  00  02  00  00  00  56  00  01
$

Finally, I asked GPSBabel to convert these three "*.gdb" files:

$ gpsbabel -i gdb -f Waypoint-Custom-0.gdb -o gpx -F Waypoint-Custom-0.gpx
QString::arg: Argument missing: "Custom %d" , 0
$ gpsbabel -i gdb -f Waypoint-Custom-1.gdb -o gpx -F Waypoint-Custom-1.gpx
QString::arg: Argument missing: "Custom %d" , 1
$ gpsbabel -i gdb -f Waypoint-Custom-3.gdb -o gpx -F Waypoint-Custom-3.gpx
QString::arg: Argument missing: "Custom %d" , 3
$

The target files produced by GPSBabel are identical, except for the cre-
ation time stamps,  and the waypoint symbol is  "Custom %d" in all three
cases:

$ cat Waypoint-Custom-0.gpx
<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.0" creator="GPSBabel - http://www.gpsbabel.org" xmlns="http://www.topografix.com/GPX/1/0">
  <time>2015-03-25T10:18:56.654Z</time>
  <bounds minlat="0.000022464" minlon="0.000027409" maxlat="0.000022464" maxlon="0.000027409"/>
  <wpt lat="0.000022464" lon="0.000027409">
    <time>2015-03-25T10:15:42Z</time>
    <name>WP001</name>
    <cmt>WP001</cmt>
    <desc>WP001</desc>
    <sym>Custom %d</sym>
  </wpt>
</gpx>
$ diff -du Waypoint-Custom-0.gpx Waypoint-Custom-1.gpx
--- Waypoint-Custom-0.gpx       2015-03-25 11:18:56.654000000 +0100
+++ Waypoint-Custom-1.gpx       2015-03-25 11:19:15.996000000 +0100
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <gpx version="1.0" creator="GPSBabel - http://www.gpsbabel.org" xmlns="http://www.topografix.com/GPX/1/0">
-  <time>2015-03-25T10:18:56.654Z</time>
+  <time>2015-03-25T10:19:15.996Z</time>
   <bounds minlat="0.000022464" minlon="0.000027409" maxlat="0.000022464" maxlon="0.000027409"/>
   <wpt lat="0.000022464" lon="0.000027409">
     <time>2015-03-25T10:15:42Z</time>
$ diff -du Waypoint-Custom-0.gpx Waypoint-Custom-3.gpx
--- Waypoint-Custom-0.gpx       2015-03-25 11:18:56.654000000 +0100
+++ Waypoint-Custom-3.gpx       2015-03-25 11:19:26.021000000 +0100
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <gpx version="1.0" creator="GPSBabel - http://www.gpsbabel.org" xmlns="http://www.topografix.com/GPX/1/0">
-  <time>2015-03-25T10:18:56.654Z</time>
+  <time>2015-03-25T10:19:26.021Z</time>
   <bounds minlat="0.000022464" minlon="0.000027409" maxlat="0.000022464" maxlon="0.000027409"/>
   <wpt lat="0.000022464" lon="0.000027409">
     <time>2015-03-25T10:15:42Z</time>
$

So it seems  GPSBabel is correctly interpreting  the waypoint symbol in-
formation in the "*.gdb" file  but then incorrectly calls "QString::arg"
to turn this  information into a  meaningful string.   Can somebody mend
this soon, please?

Sincerely,
  Rainer

PS: Does the GPX syntax allow  the text in a waypoint's "<sym>...</sym>"
clause to specify a URL pointing to a "*.bmp" or "*.jpg" file to be used
to display the corresponding waypoint (for instance via "<link href=...>
<text>...</text></link>)?  And if so, is there a way to tell GPSBabel to
use some sort  of conversion table to include  such URLs in the waypoint
specifications in a "*.gpx" file?

 ----------------------------------------------------------------------
| Rainer M Woitok                | Phone : (+49 60 93) 487 95 95       |
| Kolpingstraße 3                | Mobile: (+49 172) 813 6 831         |
| D-63846 Laufach                | Mail  : [hidden email]     |
| Germany                        |                                     |
 ----------------------------------------------------------------------


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc



------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|

Re: Problems converting Garmin custom waypoint symbol names

Robert Lipe-4

On Wed, Apr 1, 2015 at 9:54 AM, Robert Lipe <[hidden email]> wrote:
Thanx for the good description.  I'm committing a fix now to garmin_tables.cc.

On Wed, Apr 1, 2015 at 7:26 AM, Dr Rainer Woitok <[hidden email]> wrote:
Greetings,

asking GPSBabel  to convert a  Garmin "*.gdb" file  containing waypoints
with custom waypoint symbols, I am receiving error messages like

   QString::arg: Argument missing: "Custom %d" , 0

To nail the problem down, I created a test file containing just a single
waypoint (see attachment).  Here are the gory details:

Garmin MapSource recently updated to 6.15.11, running on Windows Vista.

GPSBabel 1.5.2, running on Windows Vista in a Cygwin terminal window.

First I used MapSource to create a new file "Waypoint-Custom-0.gdb" con-
taining a single waypoint "WP001"  at approximately N0.0 E0.0,  and dis-
playing it  using waypoint  symbol "Custom 0".   Again using MapSource I
then created two copies of this file,  "Waypoint-Custom-1.gdb" and "Way-
point-Custom-3.gdb",  containing the same waypoint but displaying it us-
ing waypoint symbols "Custom 1" and "Custom 3", respectively:

$ ls -l W*.gdb
-rwxr-xr-x 1 Rainer none 153 2015-03-25 11:16 Waypoint-Custom-0.gdb
-rwxr-xr-x 1 Rainer none 153 2015-03-25 11:17 Waypoint-Custom-1.gdb
-rwxr-xr-x 1 Rainer none 153 2015-03-25 11:17 Waypoint-Custom-3.gdb
$

As can be seen here, these three files are identical except for the byte
at position 112 which obviously codes the waypoint symbol to be used:

$ od -Ad -tx1a Waypoint-Custom-0.gdb > Waypoint-Custom-0.od
$ od -Ad -tx1a Waypoint-Custom-1.gdb > Waypoint-Custom-1.od
$ od -Ad -tx1a Waypoint-Custom-3.gdb > Waypoint-Custom-3.od
$ cat Waypoint-Custom-0.od
0000000  4d  73  52  63  66  00  02  00  00  00  44  6d  00  1b  00  00
          M   s   R   c   f nul stx nul nul nul   D   m nul esc nul nul
0000016  00  41  67  02  73  71  61  00  4a  61  6e  20  32  36  20  32
        nul   A   g stx   s   q   a nul   J   a   n  sp   2   6  sp   2
0000032  30  31  30  00  31  31  3a  33  31  3a  30  36  00  4d  61  70
          0   1   0 nul   1   1   :   3   1   :   0   6 nul   M   a   p
0000048  53  6f  75  72  63  65  00  56  00  00  00  57  57  50  30  30
          S   o   u   r   c   e nul   V nul nul nul   W   W   P   0   0
0000064  31  00  00  00  00  00  00  00  00  00  00  ff  ff  ff  ff  ff
          1 nul nul nul nul nul nul nul nul nul nul del del del del del
0000080  ff  ff  ff  ff  ff  ff  ff  00  00  ff  ff  ff  ff  0c  01  00
        del del del del del del del nul nul del del del del  ff soh nul
0000096  00  47  01  00  00  00  00  00  01  00  00  00  00  00  00  00
        nul   G soh nul nul nul nul nul soh nul nul nul nul nul nul nul
0000112  f4  01  00  00  00  00  00  00  00  00  00  00  00  00  00  00
          t soh nul nul nul nul nul nul nul nul nul nul nul nul nul nul
0000128  00  00  00  00  00  00  00  01  3a  79  12  55  00  00  00  00
        nul nul nul nul nul nul nul soh   :   y dc2   U nul nul nul nul
0000144  00  00  02  00  00  00  56  00  01
        nul nul stx nul nul nul   V nul soh
0000153
$ diff -du Waypoint-Custom-0.od Waypoint-Custom-1.od
--- Waypoint-Custom-0.od        2015-03-25 12:21:31.309000000 +0100
+++ Waypoint-Custom-1.od        2015-03-25 12:21:43.371000000 +0100
@@ -12,8 +12,8 @@
         del del del del del del del nul nul del del del del  ff soh nul
 0000096  00  47  01  00  00  00  00  00  01  00  00  00  00  00  00  00
         nul   G soh nul nul nul nul nul soh nul nul nul nul nul nul nul
-0000112  f4  01  00  00  00  00  00  00  00  00  00  00  00  00  00  00
-          t soh nul nul nul nul nul nul nul nul nul nul nul nul nul nul
+0000112  f5  01  00  00  00  00  00  00  00  00  00  00  00  00  00  00
+          u soh nul nul nul nul nul nul nul nul nul nul nul nul nul nul
 0000128  00  00  00  00  00  00  00  01  3a  79  12  55  00  00  00  00
         nul nul nul nul nul nul nul soh   :   y dc2   U nul nul nul nul
 0000144  00  00  02  00  00  00  56  00  01
$ diff -du Waypoint-Custom-0.od Waypoint-Custom-3.od
--- Waypoint-Custom-0.od        2015-03-25 12:21:31.309000000 +0100
+++ Waypoint-Custom-3.od        2015-03-25 12:21:47.948000000 +0100
@@ -12,8 +12,8 @@
         del del del del del del del nul nul del del del del  ff soh nul
 0000096  00  47  01  00  00  00  00  00  01  00  00  00  00  00  00  00
         nul   G soh nul nul nul nul nul soh nul nul nul nul nul nul nul
-0000112  f4  01  00  00  00  00  00  00  00  00  00  00  00  00  00  00
-          t soh nul nul nul nul nul nul nul nul nul nul nul nul nul nul
+0000112  f7  01  00  00  00  00  00  00  00  00  00  00  00  00  00  00
+          w soh nul nul nul nul nul nul nul nul nul nul nul nul nul nul
 0000128  00  00  00  00  00  00  00  01  3a  79  12  55  00  00  00  00
         nul nul nul nul nul nul nul soh   :   y dc2   U nul nul nul nul
 0000144  00  00  02  00  00  00  56  00  01
$

Finally, I asked GPSBabel to convert these three "*.gdb" files:

$ gpsbabel -i gdb -f Waypoint-Custom-0.gdb -o gpx -F Waypoint-Custom-0.gpx
QString::arg: Argument missing: "Custom %d" , 0
$ gpsbabel -i gdb -f Waypoint-Custom-1.gdb -o gpx -F Waypoint-Custom-1.gpx
QString::arg: Argument missing: "Custom %d" , 1
$ gpsbabel -i gdb -f Waypoint-Custom-3.gdb -o gpx -F Waypoint-Custom-3.gpx
QString::arg: Argument missing: "Custom %d" , 3
$

The target files produced by GPSBabel are identical, except for the cre-
ation time stamps,  and the waypoint symbol is  "Custom %d" in all three
cases:

$ cat Waypoint-Custom-0.gpx
<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.0" creator="GPSBabel - http://www.gpsbabel.org" xmlns="http://www.topografix.com/GPX/1/0">
  <time>2015-03-25T10:18:56.654Z</time>
  <bounds minlat="0.000022464" minlon="0.000027409" maxlat="0.000022464" maxlon="0.000027409"/>
  <wpt lat="0.000022464" lon="0.000027409">
    <time>2015-03-25T10:15:42Z</time>
    <name>WP001</name>
    <cmt>WP001</cmt>
    <desc>WP001</desc>
    <sym>Custom %d</sym>
  </wpt>
</gpx>
$ diff -du Waypoint-Custom-0.gpx Waypoint-Custom-1.gpx
--- Waypoint-Custom-0.gpx       2015-03-25 11:18:56.654000000 +0100
+++ Waypoint-Custom-1.gpx       2015-03-25 11:19:15.996000000 +0100
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <gpx version="1.0" creator="GPSBabel - http://www.gpsbabel.org" xmlns="http://www.topografix.com/GPX/1/0">
-  <time>2015-03-25T10:18:56.654Z</time>
+  <time>2015-03-25T10:19:15.996Z</time>
   <bounds minlat="0.000022464" minlon="0.000027409" maxlat="0.000022464" maxlon="0.000027409"/>
   <wpt lat="0.000022464" lon="0.000027409">
     <time>2015-03-25T10:15:42Z</time>
$ diff -du Waypoint-Custom-0.gpx Waypoint-Custom-3.gpx
--- Waypoint-Custom-0.gpx       2015-03-25 11:18:56.654000000 +0100
+++ Waypoint-Custom-3.gpx       2015-03-25 11:19:26.021000000 +0100
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <gpx version="1.0" creator="GPSBabel - http://www.gpsbabel.org" xmlns="http://www.topografix.com/GPX/1/0">
-  <time>2015-03-25T10:18:56.654Z</time>
+  <time>2015-03-25T10:19:26.021Z</time>
   <bounds minlat="0.000022464" minlon="0.000027409" maxlat="0.000022464" maxlon="0.000027409"/>
   <wpt lat="0.000022464" lon="0.000027409">
     <time>2015-03-25T10:15:42Z</time>
$

So it seems  GPSBabel is correctly interpreting  the waypoint symbol in-
formation in the "*.gdb" file  but then incorrectly calls "QString::arg"
to turn this  information into a  meaningful string.   Can somebody mend
this soon, please?

Sincerely,
  Rainer

PS: Does the GPX syntax allow  the text in a waypoint's "<sym>...</sym>"
clause to specify a URL pointing to a "*.bmp" or "*.jpg" file to be used
to display the corresponding waypoint (for instance via "<link href=...>
<text>...</text></link>)?  And if so, is there a way to tell GPSBabel to
use some sort  of conversion table to include  such URLs in the waypoint
specifications in a "*.gpx" file?

 ----------------------------------------------------------------------
| Rainer M Woitok                | Phone : <a href="tel:%28%2B49%2060%2093%29%20487%2095%2095" value="+4960934879595" target="_blank">(+49 60 93) 487 95 95       |
| Kolpingstraße 3                | Mobile: (+49 172) 813 6 831         |
| D-63846 Laufach                | Mail  : [hidden email]     |
| Germany                        |                                     |
 ----------------------------------------------------------------------


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc




------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|

Re: Problems converting Garmin custom waypoint symbol names

Dr Rainer Woitok
In reply to this post by tsteven4-2
Steve,

On Wednesday, 2015-04-01 07:20:30 -0600, you wrote:

> ...
> The bug you reported is fixed in
> https://code.google.com/p/gpsbabel/source/detail?r=4985

Wow, Steve,  that was a  fix in less  than no time,  with Robert being a
close second :-D

Fixing the bug in the source  repository of course means  that I have to
download the source and compile it myself.   I hate to say it,  but I am
by far slower than both of you.   Due to more pressing tasks  (like, for
instance, vacation (*grin*))  it took until recently  that I  downloaded
the source repository and tried to compile it under Cygwin.

I got plenty of warning  messages, regardless of  some of the "README.*"
files saying that "Compilers complain for a reason.  Code shouldn't emit
warnings."  Well, but the main problem was that I got hard errors.  Most
probably I'm the first guinea pig  trying to compile GPSBabel under Cyg-
win:

gbser_win.cc: In function ‘const char* fix_win_serial_name_r(const char*, char*, size_t)’:
gbser_win.cc:158:49: error: ‘snprintf’ was not declared in this scope
     snprintf(obuf, len, DEV_PREFIX "%s", comname);
                                                 ^
Makefile:128: recipe for target 'gbser_win.o' failed
make: *** [gbser_win.o] Error 1

I fixed this with the following simple patch:

diff --git a/gbser_win.cc b/gbser_win.cc
--- a/gbser_win.cc
+++ b/gbser_win.cc
@@ -28,6 +28,7 @@
 
 #include <assert.h>
 #include <stdarg.h>
+#include <stdio.h>
 
 typedef struct {
   HANDLE          comport;

The second hard error occured in the "zlib" software:

zlib/contrib/minizip/ioapi.o: In function `fseek64_file_func':
/home/Rainer/repo/gpsbabel/zlib/contrib/minizip/ioapi.c:203: undefined reference to `fseeko64'
zlib/contrib/minizip/ioapi.o: In function `ftell64_file_func':
/home/Rainer/repo/gpsbabel/zlib/contrib/minizip/ioapi.c:157: undefined reference to `ftello64'
zlib/contrib/minizip/ioapi.o: In function `fopen64_file_func':
/home/Rainer/repo/gpsbabel/zlib/contrib/minizip/ioapi.c:127: undefined reference to `fopen64'
collect2: error: ld returned 1 exit status
Makefile:150: recipe for target 'gpsbabel.exe' failed
make: *** [gpsbabel.exe] Error 1

Since under Cygwin  "off_t"  is always 64 bits wide,  and since I had no
idea how to include Cygwin into that "#if" clause, I simply replaced the
whole "#if ... #endif" clause  with the three  "#define"  statements for
the function names without the "64" suffix:

diff --git a/zlib/contrib/minizip/ioapi.c b/zlib/contrib/minizip/ioapi.c
--- a/zlib/contrib/minizip/ioapi.c
+++ b/zlib/contrib/minizip/ioapi.c
@@ -14,16 +14,9 @@
         #define _CRT_SECURE_NO_WARNINGS
 #endif
 
-#if defined(__APPLE__) || defined(IOAPI_NO_64)
-// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
 #define FOPEN_FUNC(filename, mode) fopen(filename, mode)
 #define FTELLO_FUNC(stream) ftello(stream)
 #define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin)
-#else
-#define FOPEN_FUNC(filename, mode) fopen64(filename, mode)
-#define FTELLO_FUNC(stream) ftello64(stream)
-#define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin)
-#endif
 
 
 #include "ioapi.h"

Then compilation succeeded (though still with zillions of warnings :-)

There's of course more to do  to provide clean patches  that work on any
operating system,  but I graciously  leave this as  an exercise  for the
reader :-)

I hope this is of some help ...

Sincerely
 Rainer

 ----------------------------------------------------------------------
| Rainer M Woitok                | Phone : (+49 60 93) 487 95 95       |
| Kolpingstraße 3                | Mobile: (+49 172) 813 6 831         |
| D-63846 Laufach                | Mail  : [hidden email]     |
| Germany                        |                                     |
 ----------------------------------------------------------------------

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|

Re: Problems converting Garmin custom waypoint symbol names

Robert Lipe-2


On Tue, Jul 7, 2015 at 8:29 AM, Dr Rainer Woitok <[hidden email]> wrote:
I got plenty of warning  messages, regardless of  some of the "README.*"
files saying that "Compilers complain for a reason.  Code shouldn't emit
warnings."  Well, but the main problem was that I got hard errors.  Most

That's been a harder line to hold than we'd have liked.  The problem is that different versions of the compilers have different versions turned on.  So while the actively maintained targets compile warning-free, some of the lesser trodden paths may whine.

I think the sign-comparison are the ones that are most worrisome as "fixing" them in the completely obvious way is sometimes wrong.

gbser_win.cc: In function ‘const char* fix_win_serial_name_r(const char*, char*, size_t)’:
gbser_win.cc:158:49: error: ‘snprintf’ was not declared in this scope
     snprintf(obuf, len, DEV_PREFIX "%s", comname);
                                                 ^
I fixed this with the following simple patch:
+#include <stdio.h>

That's the correct fix.  Thanx.  Committed.

 
The second hard error occured in the "zlib" software:

That's a new code path for us.

Probably we need to set IOAPI_NO_64 in some kind of configure file.  For now, adding || defined (__CYGWIN__) to that list probably works. Probably.

Since under Cygwin  "off_t"  is always 64 bits wide,  and since I had no
idea how to include Cygwin into that "#if" clause, I simply replaced the
whole "#if ... #endif" clause  with the three  "#define"  statements for
the function names without the "64" suffix:

That's the "when you have a hammer" move.  Good thinking!

 
I hope this is of some help ..

It is.  Thanx. 

RJL 

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|

Re: Problems converting Garmin custom waypoint symbol names

Dr Rainer Woitok
Robert,

On Tuesday, 2015-07-07 12:30:30 -0500, you wrote:

> ...
> I think the sign-comparison are the ones that are most worrisome as "fixing"
> them in the completely obvious way is sometimes wrong.

The first message that caught my eye was from "configure":

checking for random stuff to make you feel better... failed

I'm not at all sure what to make of it.

The other warnings originated from the compiler.   Apart from "sign-com-
pare" type warnings I got plenty of  "unused-but-set-variable" (and it's
a bit enervating  to read about set but unused variables  like "lat" and
"lon" in a GPS program), a few "char-subscripts", two "array-bounds" and
one "comment" type warning  (not sure whether or not  these only show up
under Cygwin, so I'll go into the trouble of listing them all here).

*** Begin of Warnings (skip to "***" to read on :-):

route.cc: In function ‘void track_recompute(const route_head*, computed_trkdata**)’:
route.cc:664:84: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (thisw->GetCreationTime().isValid() && (thisw->GetCreationTime().toTime_t() < tdata->start)) {
                                                                                    ^
route.cc:668:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (thisw->creation_time.toTime_t() > tdata->end) {
                                         ^
strptime.c: In function ‘strptime_internal’:
strptime.c:302:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
     if (isspace(*fmt)) {
     ^
strptime.c:303:7: warning: array subscript has type ‘char’ [-Wchar-subscripts]
       while (isspace(*rp)) {
       ^
strptime.c:520:7: warning: array subscript has type ‘char’ [-Wchar-subscripts]
       while (isspace(*rp)) {
       ^
strptime.c:289:21: warning: variable ‘era’ set but not used [-Wunused-but-set-variable]
   struct era_entry *era;
                     ^
strptime.c:277:15: warning: variable ‘rp_backup’ set but not used [-Wunused-but-set-variable]
   const char *rp_backup;
               ^
jeeps/gpsapp.cc: In function ‘void GPS_D109_Get(GPS_SWay**, UC*, int)’:
jeeps/gpsapp.cc:1682:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (gps_time != 0xffffffff && gps_time != 0) {
                  ^
jeeps/gpsapp.cc: In function ‘void GPS_D311_Get(GPS_STrack**, UC*)’:
jeeps/gpsapp.cc:4487:7: warning: variable ‘p’ set but not used [-Wunused-but-set-variable]
   UC* p;
       ^
jeeps/gpscom.cc: In function ‘int32 GPS_Command_Send_Course(const char*, GPS_SCourse**, GPS_SCourse_Lap**, GPS_STrack**, GPS_SCourse_Point**, int32, int32, int32, int32)’:
jeeps/gpscom.cc:806:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (n_crs > limits.max_courses
             ^
jeeps/gpscom.cc:807:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       || n_clp > limits.max_course_laps
                ^
jeeps/gpscom.cc:808:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       || n_trk > limits.max_course_trk_pnt
                ^
jeeps/gpscom.cc:809:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       || n_cpt > limits.max_course_pnt) {
                ^
jeeps/gpscom.cc:784:9: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
   int32 ret;
         ^
jeeps/gpscom.cc: In function ‘int32 GPS_Command_Send_Track_As_Course(const char*, GPS_STrack**, int32, GPS_SWay**, int32, int)’:
jeeps/gpscom.cc:1270:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       if (crs[j]->track_index == min_dist_trk_idx) {
                               ^
jeeps/gpsread.cc: In function ‘int32 GPS_Serial_Packet_Read(gpsdevh*, GPS_PPacket*)’:
jeeps/gpsread.cc:132:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
           if (p-(*packet).data-2 != (*packet).n) {
                                  ^
jeeps/gpsread.cc:139:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
           for (i=0,p=(*packet).data; i<(*packet).n; ++i) {
                                       ^
jeeps/gpsread.cc:153:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (i = 0; i < packet->n; i++) {
                           ^
jeeps/gpssend.cc: In function ‘US Build_Serial_Packet(GPS_PPacket, GPS_Serial_PPacket)’:
jeeps/gpssend.cc:70:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (i = 0; i < in.n; ++i) {
                 ^
jeeps/gpssend.cc: In function ‘int32 GPS_Serial_Write_Packet(gpsdevh*, GPS_PPacket&)’:
jeeps/gpssend.cc:139:71: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if ((ret=GPS_Serial_Write(fd,(const void*) &ser_pkt.dle,(size_t)3)) == -1) {
                                                                       ^
jeeps/gpssend.cc:150:74: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if ((ret=GPS_Serial_Write(fd,(const void*)ser_pkt.data,(size_t)bytes)) == -1) {
                                                                          ^
jeeps/gpssend.cc:169:70: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if ((ret=GPS_Serial_Write(fd,(const void*)&ser_pkt.chk,(size_t)3)) == -1) {
                                                                      ^
jeeps/gpsusbcommon.cc: In function ‘int gusb_cmd_get(garmin_usb_packet*, size_t)’:
jeeps/gpsusbcommon.cc:86:7: warning: variable ‘orig_receive_state’ set but not used [-Wunused-but-set-variable]
   int orig_receive_state;
       ^
In file included from /usr/include/qt4/QtCore/QString:1:0,
                 from jeeps/../gbfile.h:30,
                 from jeeps/../defs.h:33,
                 from jeeps/gps.h:4,
                 from jeeps/gpsusbcommon.cc:22:
/usr/include/qt4/QtCore/qstring.h: In function ‘void gusb_id_unit(garmin_unit_info_t*)’:
/usr/include/qt4/QtCore/qstring.h:419:90: warning: array subscript is above array bounds [-Warray-bounds]
     inline QT_ASCII_CAST_WARN_CONSTRUCTOR QString(const char *ch) : d(fromAscii_helper(ch))
                                                                                          ^
jeeps/gpsusbcommon.cc:230:60: warning: array subscript is above array bounds [-Warray-bounds]
       gu->unit_version = le_read16(iresp.gusb_pkt.databuf+2);
                                                            ^
jeeps/gpsusbwin.cc: In function ‘int gusb_win_get_bulk(garmin_usb_packet*, size_t)’:
jeeps/gpsusbwin.cc:100:7: warning: variable ‘n’ set but not used [-Wunused-but-set-variable]
   int n;
       ^
shapelib/dbfopen.c: In function ‘str_to_upper’:
shapelib/dbfopen.c:1673:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         if (isalpha(string[i]) && islower(string[i]))
         ^
shapelib/dbfopen.c:1673:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
magproto.cc: In function ‘void mag_serial_init_common(const char*)’:
magproto.cc:750:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (current_time().toTime_t() > later) {
                                   ^
mapsend.cc: In function ‘void mapsend_wpt_read()’:
mapsend.cc:114:7: warning: variable ‘wpt_number’ set but not used [-Wunused-but-set-variable]
   int wpt_number;
       ^
mapsend.cc:116:8: warning: variable ‘wpt_status’ set but not used [-Wunused-but-set-variable]
   char wpt_status;
        ^
mapsend.cc: In function ‘void mapsend_track_read()’:
mapsend.cc:192:7: warning: variable ‘valid’ set but not used [-Wunused-but-set-variable]
   int valid;
       ^
mapsource.cc: In function ‘void mps_read()’:
mapsource.cc:1734:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       if (gbftell(mps_file_in) != mpsFileInPos + reclen) {
                                ^
mapsource.cc:1759:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       if (gbftell(mps_file_in) != mpsFileInPos + reclen) {
                                ^
mapsource.cc:1772:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       if (gbftell(mps_file_in) != mpsFileInPos + reclen) {
                                ^
mapsource.cc:1785:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       if (gbftell(mps_file_in) != mpsFileInPos + reclen) {
                                ^
nmea.cc: In function ‘void gpgsa_parse(char*)’:
nmea.cc:678:8: warning: variable ‘scn’ set but not used [-Wunused-but-set-variable]
   int  scn,cnt;
        ^
nmea.cc: In function ‘void nmea_fix_timestamps(route_head*)’:
nmea.cc:902:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (wpt->creation_time.toTime_t() > prev) {
                                           ^
gdb.cc:178:1: warning: multi-line comment [-Wcomment]
 //#define FREAD_CSTR \
 ^
skytraq.cc: In function ‘int skytraq_rd_msg(const void*, unsigned int)’:
skytraq.cc:288:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if ((rcv_len = rd_word()) < len) {
                             ^
skytraq.cc:53:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
                       ^
skytraq.cc:298:42: note: in expansion of macro ‘MIN’
   rd_buf((const unsigned char*) payload, MIN(rcv_len, len));
                                          ^
skytraq.cc:53:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
                       ^
skytraq.cc:300:67: note: in expansion of macro ‘MIN’
   calc_cs = skytraq_calc_checksum((const unsigned char*) payload, MIN(rcv_len, len));
                                                                   ^
saroute.cc: In function ‘void my_read()’:
saroute.cc:211:29: warning: variable ‘cmtlen’ set but not used [-Wunused-but-set-variable]
         int obase, addrlen, cmtlen;
                             ^
psitrex.cc: In function ‘void psit_route_r(gbfile*, route_head**)’:
psitrex.cc:393:16: warning: variable ‘rte_num’ set but not used [-Wunused-but-set-variable]
   unsigned int rte_num;
                ^
psitrex.cc:398:16: warning: variable ‘rte_count’ set but not used [-Wunused-but-set-variable]
   unsigned int rte_count;
                ^
psitrex.cc: In function ‘void psit_routehdr_w(gbfile*, const route_head*)’:
psitrex.cc:477:9: warning: variable ‘allWptNameLengths’ set but not used [-Wunused-but-set-variable]
   int   allWptNameLengths;
         ^
psitrex.cc: In function ‘void psit_track_r(gbfile*, route_head**)’:
psitrex.cc:532:16: warning: variable ‘trk_count’ set but not used [-Wunused-but-set-variable]
   unsigned int trk_count;
                ^
igc.cc: In function ‘double interpolate_alt(const route_head*, time_t)’:
igc.cc:827:64: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   while (((Waypoint*) curr_elem)->GetCreationTime().toTime_t() < time) {
                                                                ^
igc.cc:840:48: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (curr_wpt->GetCreationTime().toTime_t() == time) {
                                                ^
an1.cc: In function ‘void Read_AN1_Header(gbfile*)’:
an1.cc:638:18: warning: variable ‘magic’ set but not used [-Wunused-but-set-variable]
   unsigned short magic;
                  ^
vitosmt.cc: In function ‘void vitosmt_read()’:
vitosmt.cc:74:10: warning: variable ‘check2’ set but not used [-Wunused-but-set-variable]
   long   check2   =-2;
          ^
dmtlog.cc: In function ‘void read_CTrackFile(int)’:
dmtlog.cc:413:11: warning: variable ‘ux’ set but not used [-Wunused-but-set-variable]
   int32_t ux;
           ^
vitovtt.cc: In function ‘void vitovtt_read()’:
vitovtt.cc:68:12: warning: variable ‘speed’ set but not used [-Wunused-but-set-variable]
   double   speed   = 0;
            ^
vitovtt.cc:69:10: warning: variable ‘course’ set but not used [-Wunused-but-set-variable]
   int    course   = 0;
          ^
vitovtt.cc:70:10: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
   int    status   = 0;
          ^
dg-100.cc: In function ‘int dg100_recv_frame(dg100_command**, uint8_t**)’:
dg-100.cc:408:12: warning: variable ‘payload_end_seq’ set but not used [-Wunused-but-set-variable]
   uint16_t payload_end_seq, payload_checksum, frame_end_seq;
            ^
dg-100.cc:408:47: warning: variable ‘frame_end_seq’ set but not used [-Wunused-but-set-variable]
   uint16_t payload_end_seq, payload_checksum, frame_end_seq;
                                               ^
navilink.cc: In function ‘int read_packet(unsigned int, void*, unsigned int, unsigned int, int)’:
navilink.cc:314:66: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (gbser_read_wait(serial_handle, data, size, SERIAL_TIMEOUT) != size) {
                                                                  ^
mtk_logger.cc: In function ‘void mtk_read()’:
mtk_logger.cc:677:47: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
               if (fread(line, 1, bsize, dout) == bsize && memcmp(line, data, bsize) == 0) {
                                               ^
mtk_logger.cc:693:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             if (fwrite(data, 1, j, dout) != j) {
                                          ^
mmo.cc: In function ‘void mmo_read_CObjIcons(mmo_data_t*)’:
mmo.cc:385:12: warning: variable ‘u16’ set but not used [-Wunused-but-set-variable]
   uint16_t u16;
            ^
mmo.cc: In function ‘void mmo_read_CObjWaypoint(mmo_data_t*)’:
mmo.cc:453:14: warning: variable �u16’ set but not used [-Wunused-but-set-variable]
     uint16_t u16;
              ^
mmo.cc:435:10: warning: variable ‘ux’ set but not used [-Wunused-but-set-variable]
   int i, ux;
          ^
mmo.cc: In function ‘void mmo_read_CObjRoute(mmo_data_t*)’:
mmo.cc:576:14: warning: variable ‘u16’ set but not used [-Wunused-but-set-variable]
     uint16_t u16;
              ^
mmo.cc:565:7: warning: variable ‘ux’ set but not used [-Wunused-but-set-variable]
   int ux;
       ^
mmo.cc: In function ‘void mmo_read_CObjTrack(mmo_data_t*)’:
mmo.cc:651:14: warning: variable ‘u16’ set but not used [-Wunused-but-set-variable]
     uint16_t u16;
              ^
mmo.cc:685:18: warning: variable ‘ux’ set but not used [-Wunused-but-set-variable]
         uint16_t ux;
                  ^
mmo.cc:681:16: warning: variable ‘ux’ set but not used [-Wunused-but-set-variable]
       uint16_t ux;
                ^
mmo.cc:694:14: warning: variable ‘u32’ set but not used [-Wunused-but-set-variable]
     uint32_t u32;
              ^
mmo.cc:727:16: warning: variable ‘u16’ set but not used [-Wunused-but-set-variable]
       uint16_t u16;
                ^
mmo.cc: In function ‘void mmo_read_CObjText(mmo_data_t*)’:
mmo.cc:755:10: warning: variable ‘lat’ set but not used [-Wunused-but-set-variable]
   double lat, lon;
          ^
mmo.cc:755:15: warning: variable ‘lon’ set but not used [-Wunused-but-set-variable]
   double lat, lon;
               ^
mmo.cc: In function ‘void mmo_read_CObjCurrentPosition(mmo_data_t*)’:
mmo.cc:787:10: warning: variable ‘lat’ set but not used [-Wunused-but-set-variable]
   double lat, lon;
          ^
mmo.cc:787:15: warning: variable ‘lon’ set but not used [-Wunused-but-set-variable]
   double lat, lon;
               ^
mmo.cc: In function ‘mmo_data_t* mmo_read_object()’:
mmo.cc:877:16: warning: variable ‘obj_type’ set but not used [-Wunused-but-set-variable]
       uint32_t obj_type;
                ^
mmo.cc: In function ‘void mmo_write_rte_head_cb(const route_head*)’:
mmo.cc:1331:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if ((t.isValid()) && (t.toTime_t() < time)) {
                                        ^
subrip.cc: In function ‘void subrip_prevwp_pr(const Waypoint*)’:
subrip.cc:71:45: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (prevwpp->GetCreationTime().toTime_t() < time_offset) {
                                             ^
garmin_xt.cc: In function ‘uint16_t format_garmin_xt_rd_st_attrs(char*, uint8_t*)’:
garmin_xt.cc:90:28: warning: variable ‘TrackPoints’ set but not used [-Wunused-but-set-variable]
   uint16_t trackbytes = 0, TrackPoints = 0;
                            ^
garmin_xt.cc: In function ‘void format_garmin_xt_proc_strk()’:
garmin_xt.cc:242:22: warning: variable ‘PrevTime’ set but not used [-Wunused-but-set-variable]
   uint32_t Time = 0, PrevTime =0; // wpt data
                      ^
lowranceusr4.cc: In function ‘void lowranceusr4_parse_waypoints()�:
lowranceusr4.cc:349:13: warning: variable ‘icon_num’ set but not used [-Wunused-but-set-variable]
   short int icon_num;
             ^
lowranceusr4.cc: In function ‘void data_read()’:
lowranceusr4.cc:729:16: warning: variable ‘create_date’ set but not used [-Wunused-but-set-variable]
   unsigned int create_date, create_time, serial_num;
                ^
lowranceusr4.cc:729:29: warning: variable ‘create_time’ set but not used [-Wunused-but-set-variable]
   unsigned int create_date, create_time, serial_num;
                             ^
lowranceusr4.cc:730:17: warning: variable ‘byte’ set but not used [-Wunused-but-set-variable]
   unsigned char byte;
                 ^
trackfilter.cc: In function ‘void trackfilter_synth()’:
trackfilter.cc:824:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
           if (oldtime != wpt->GetCreationTime().toTime_t()) {
                       ^
trackfilter.cc: In function ‘int trackfilter_range()’:
trackfilter.cc:905:54: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         inside = ((wpt->GetCreationTime().toTime_t() >= start) && (wpt->GetCreationTime().toTime_t() <= stop));
                                                      ^
trackfilter.cc:905:102: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         inside = ((wpt->GetCreationTime().toTime_t() >= start) && (wpt->GetCreationTime().toTime_t() <= stop));
                                                                                                      ^

*** End of Warnings.

> ...
>                                                                      For now,
> adding || defined (__CYGWIN__) to that list probably works. Probably.

Bingo! That DOES in fact work!

Sincerely
 Rainer

 ----------------------------------------------------------------------
| Rainer M Woitok                | Phone : (+49 60 93) 487 95 95       |
| Kolpingstraße 3                | Mobile: (+49 172) 813 6 831         |
| D-63846 Laufach                | Mail  : [hidden email]     |
| Germany                        |                                     |
 ----------------------------------------------------------------------

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|

Re: Problems converting Garmin custom waypoint symbol names

Robert Lipe-2
Opening note: If you're a dabbler in programming, there's about a dozen independent projects laid out below. Each is small - most are a dozens of lines of code or less and we could use a hand with more contributors in the code.



adding gpsbabel-code for the bitslingers.
gpsbabel-misc -> bcc for closure on that list.


The first message that caught my eye was from "configure":

checking for random stuff to make you feel better... failed

I'm not at all sure what to make of it.

It means I had a theory that nobody ever read that giant wall of text.  You're like the third person in ~15 years and millions of downloads to notice it. :-)


The other warnings originated from the compiler.   Apart from "sign-com-
pare" type warnings I got plenty of  "unused-but-set-variable" (and it's
a bit enervating  to read about set but unused variables  like "lat" and
"lon" in a GPS program), a few "char-subscripts", two "array-bounds" and

I checked in r5002 that cleans up a lot of these.  All were benign.  It's pretty common in code that reads disk files to have to read some bytes and have some idea what they are but not need them.  It's handy to give them a name.  The lat/lon cases were all of the form.

  lat = read_N_bytes();
  lon = read_N_bytes();
  something_important = read_N_bytes()
#if DEBUG
   print something_important about lat/lon
#endif

...we have to read those bytes, but if we're not debugging, we don't DO anything with them.  "fixed" by decorating (void). 


one "comment" type warning  (not sure whether or not  these only show up
under Cygwin, so I'll go into the trouble of listing them all here).

It looks like GCC 4.8 has added a bunch of hyperactive warnings to -Wall.  We should probably turn these off unless someone else wants to do the work of cleaning these up. I've ripped through the mechanical ones and fixed them, but I'll scribble notes on the remaining ones that actually need some thought  in the hope that it helps budding Bablers tackle small projects.  (I think I'm traveling 3 of the next 4 weeks...)

 
route.cc: In function ‘void track_recompute(const route_head*, computed_trkdata**)’:
route.cc:664:84: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (thisw->GetCreationTime().isValid() && (thisw->GetCreationTime().toTime_t() < tdata->start)) {
                                                                                    ^
route.cc:668:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (thisw->creation_time.toTime_t() > tdata->end) {

route.cc should quit using toTime_t.  tdata needs to use appropriate data types.

 
strptime.c: In function ‘strptime_internal’:
strptime.c:302:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
     if (isspace(*fmt)) {
     ^
strptime.c:303:7: warning: array subscript has type ‘char’ [-Wchar-subscripts]
       while (isspace(*rp)) {
       ^
strptime.c:520:7: warning: array subscript has type ‘char’ [-Wchar-subscripts]
       while (isspace(*rp)) {
       ^
strptime.c:289:21: warning: variable ‘era’ set but not used [-Wunused-but-set-variable]
   struct era_entry *era;
                     ^
strptime.c:277:15: warning: variable ‘rp_backup’ set but not used [-Wunused-but-set-variable]
   const char *rp_backup;

Should look for an update version of strptime from upstream.  Better yet, find remaining uses of strptime and replace them with QDateTime methods.   Unfortunately, we may have to keep strptime for csv_util because we expose them in the csv files and the Qt format strings aren't QUITE the same as the strptime.  (Frankly, if it was the only remaining use, I'd go fix our own style files and remove strptime and just say that's the new scheme...)


 
jeeps/gpsapp.cc: In function ‘void GPS_D109_Get(GPS_SWay**, UC*, int)’:
jeeps/gpsapp.cc:1682:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (gps_time != 0xffffffff && gps_time != 0) {

Cast it or make the constant U ?


jeeps/gpscom.cc: In function ‘int32 GPS_Command_Send_Course(const char*, GPS_SCourse**, GPS_SCourse_Lap**, GPS_STrack**, GPS_SCourse_Point**, int32, int32, int32, int32)’:
jeeps/gpscom.cc:806:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (n_crs > limits.max_courses
             ^
jeeps/gpscom.cc:807:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       || n_clp > limits.max_course_laps
                ^
jeeps/gpscom.cc:808:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       || n_trk > limits.max_course_trk_pnt
                ^
jeeps/gpscom.cc:809:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       || n_cpt > limits.max_course_pnt) {

This is Gerhard's course stuff; I'm not sure we ever even actually use it. Maybe we should compile that course stuff away totally.

Meta Grouchiness about Jeeps: Can'd decide between CamelCase and underbar_separators? Why not BOTH!

t has type ‘char’ [-Wchar-subscripts]
magproto.cc: In function ‘void mag_serial_init_common(const char*)’:
magproto.cc:750:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (current_time().toTime_t() > later) {

Should quit using Time_t. Fix the type for 'later'.


 
nmea.cc: In function ‘void gpgsa_parse(char*)’:
nmea.cc:678:8: warning: variable ‘scn’ set but not used [-Wunused-but-set-variable]
   int  scn,cnt;

This was about the only one that indicated an actual bug.  Fixed. (weakly)

 
> ...
>                                                                      For now,
> adding || defined (__CYGWIN__) to that list probably works. Probably.

Bingo! That DOES in fact work!

That should probably be solved "better", but for now, I've added that just to remove the obstacle for any Cygwin users in the audience.  A better fix would test for the foo64() functions in configure and set the existing IOAPI_NO_64 manifest and remove my hack.


 

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc