]> git.street.me.uk Git - andy/viking.git/blobdiff - src/degrees_converters.c
[DOC] Fix some incorrect docbook markup.
[andy/viking.git] / src / degrees_converters.c
index 8e674dff576c5cee94f71ba8d756618d9cb23373..573b8cc1f9a2f8c5d01d39e0c0180349cbe9aa6f 100644 (file)
@@ -138,7 +138,7 @@ static gchar *convert_dec_to_dms(gdouble dec, gchar pos_c, gchar neg_c)
   val_s = (tmp - val_m) * 60;
 
   /* Format */
-  result = g_strdup_printf ( "%c%d" DEGREE_SYMBOL "%d'%f\"",
+  result = g_strdup_printf ( "%c%d" DEGREE_SYMBOL "%d'%.4f\"",
                              sign_c, val_d, val_m, val_s );
   return result;
 }
@@ -178,7 +178,7 @@ gdouble convert_dms_to_dec(const gchar *dms)
                        gdouble value;
                        ptr = strpbrk (endptr, "0123456789,.");
                        if (ptr != NULL) {
-                               value = g_strtod(ptr, &endptr);
+                         value = g_strtod((const gchar *)ptr, (gchar **)&endptr);
                        nbFloat++;
                switch(nbFloat) {
                        case 1: