]> git.street.me.uk Git - andy/viking.git/commitdiff
strtod -> g_strtod
authorEvan Battaglia <gtoevan@gmx.net>
Wed, 28 Sep 2005 03:48:10 +0000 (03:48 +0000)
committerEvan Battaglia <gtoevan@gmx.net>
Wed, 28 Sep 2005 03:48:10 +0000 (03:48 +0000)
src/gpspoint.c
src/gpx.c
src/usgs.c

index 13e72d72feb9bd7e565c824facf479611e7368da..e7f2d3206d8ace2d3849946560120785dbb5085f 100644 (file)
@@ -349,15 +349,15 @@ static void gpspoint_process_key_and_value ( const gchar *key, gint key_len, con
   }
   else if (key_len == 8 && strncasecmp( key, "latitude", key_len ) == 0 && value != NULL)
   {
-    line_latlon.lat = strtod(value, NULL);
+    line_latlon.lat = g_strtod(value, NULL);
   }
   else if (key_len == 9 && strncasecmp( key, "longitude", key_len ) == 0 && value != NULL)
   {
-    line_latlon.lon = strtod(value, NULL);
+    line_latlon.lon = g_strtod(value, NULL);
   }
   else if (key_len == 8 && strncasecmp( key, "altitude", key_len ) == 0 && value != NULL)
   {
-    line_altitude = strtod(value, NULL);
+    line_altitude = g_strtod(value, NULL);
   }
   else if (key_len == 7 && strncasecmp( key, "visible", key_len ) == 0 && value[0] != 'y' && value[0] != 'Y' && value[0] != 't' && value[0] != 'T')
   {
@@ -365,7 +365,7 @@ static void gpspoint_process_key_and_value ( const gchar *key, gint key_len, con
   }
   else if (key_len == 8 && strncasecmp( key, "unixtime", key_len ) == 0 && value != NULL)
   {
-    line_timestamp = strtod(value, NULL);
+    line_timestamp = g_strtod(value, NULL);
     if ( line_timestamp != 0x80000000 )
       line_has_timestamp = TRUE;
   }
index 4c6d36b2c54162737dd2cd195299faa891e78517..1aad2b0bdf377e4223194bf1d35d1a63064531b6 100644 (file)
--- a/src/gpx.c
+++ b/src/gpx.c
@@ -140,8 +140,8 @@ static const char *get_attr ( const char **attr, const char *key )
 static gboolean set_c_ll ( const char **attr )
 {
   if ( (c_slat = get_attr ( attr, "lat" )) && (c_slon = get_attr ( attr, "lon" )) ) {
-    c_ll.lat = strtod(c_slat, NULL);
-    c_ll.lon = strtod(c_slon, NULL);
+    c_ll.lat = g_strtod(c_slat, NULL);
+    c_ll.lon = g_strtod(c_slon, NULL);
     return TRUE;
   }
   return FALSE;
@@ -265,12 +265,12 @@ static void gpx_end(VikTrwLayer *vtl, const char *el)
        break;
 
      case tt_wpt_ele:
-       c_wp->altitude = strtod ( c_cdata->str, NULL );
+       c_wp->altitude = g_strtod ( c_cdata->str, NULL );
        g_string_erase ( c_cdata, 0, -1 );
        break;
 
      case tt_trk_trkseg_trkpt_ele:
-       c_tp->altitude = strtod ( c_cdata->str, NULL );
+       c_tp->altitude = g_strtod ( c_cdata->str, NULL );
        g_string_erase ( c_cdata, 0, -1 );
        break;
 
index 89c0c87b89fa77848f1a9f93a1067b75ab38ec9f..aa9649adb5c06f12e9807ded57aa4e667192689c 100644 (file)
@@ -83,7 +83,6 @@ gint usgs_scale_to_drg ( gint scale )
 
   static const char *usgs_scale_factor() {
     static char str[11];
-    static int i = 0;
     snprintf(str,sizeof(str),"%d%d%d", 044, 393, 0xA573);
     return str;
   }