* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#ifdef HAVE_MATH_H
#include <math.h>
-#include <glib.h>
+#endif
#include <string.h>
+#include "degrees_converters.h"
#define DEGREE_SYMBOL "\302\260"
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;
}
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: