correctly fetch the current locale, fix from owen.
authorTim Janik <timj@gtk.org>
Sun, 9 Jan 2000 10:58:55 +0000 (10:58 +0000)
committerTim Janik <timj@src.gnome.org>
Sun, 9 Jan 2000 10:58:55 +0000 (10:58 +0000)
Sun Jan  9 13:28:36 2000  Tim Janik  <timj@gtk.org>

        * gstrfuncs.c (g_strtod): correctly fetch the current locale,
        fix from owen.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/gstrfuncs.c
gstrfuncs.c

index e43e739..ef72dca 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Jan  9 13:28:36 2000  Tim Janik  <timj@gtk.org>
+
+       * gstrfuncs.c (g_strtod): correctly fetch the current locale,
+       fix from owen.
+
 1999-12-16  Tor Lillqvist  <tml@iki.fi>
 
        * gmodule/gmodule-win32.c: Use FormatMessage to translate system
index e43e739..ef72dca 100644 (file)
@@ -1,3 +1,8 @@
+Sun Jan  9 13:28:36 2000  Tim Janik  <timj@gtk.org>
+
+       * gstrfuncs.c (g_strtod): correctly fetch the current locale,
+       fix from owen.
+
 1999-12-16  Tor Lillqvist  <tml@iki.fi>
 
        * gmodule/gmodule-win32.c: Use FormatMessage to translate system
index e43e739..ef72dca 100644 (file)
@@ -1,3 +1,8 @@
+Sun Jan  9 13:28:36 2000  Tim Janik  <timj@gtk.org>
+
+       * gstrfuncs.c (g_strtod): correctly fetch the current locale,
+       fix from owen.
+
 1999-12-16  Tor Lillqvist  <tml@iki.fi>
 
        * gmodule/gmodule-win32.c: Use FormatMessage to translate system
index e43e739..ef72dca 100644 (file)
@@ -1,3 +1,8 @@
+Sun Jan  9 13:28:36 2000  Tim Janik  <timj@gtk.org>
+
+       * gstrfuncs.c (g_strtod): correctly fetch the current locale,
+       fix from owen.
+
 1999-12-16  Tor Lillqvist  <tml@iki.fi>
 
        * gmodule/gmodule-win32.c: Use FormatMessage to translate system
index e43e739..ef72dca 100644 (file)
@@ -1,3 +1,8 @@
+Sun Jan  9 13:28:36 2000  Tim Janik  <timj@gtk.org>
+
+       * gstrfuncs.c (g_strtod): correctly fetch the current locale,
+       fix from owen.
+
 1999-12-16  Tor Lillqvist  <tml@iki.fi>
 
        * gmodule/gmodule-win32.c: Use FormatMessage to translate system
index e43e739..ef72dca 100644 (file)
@@ -1,3 +1,8 @@
+Sun Jan  9 13:28:36 2000  Tim Janik  <timj@gtk.org>
+
+       * gstrfuncs.c (g_strtod): correctly fetch the current locale,
+       fix from owen.
+
 1999-12-16  Tor Lillqvist  <tml@iki.fi>
 
        * gmodule/gmodule-win32.c: Use FormatMessage to translate system
index e43e739..ef72dca 100644 (file)
@@ -1,3 +1,8 @@
+Sun Jan  9 13:28:36 2000  Tim Janik  <timj@gtk.org>
+
+       * gstrfuncs.c (g_strtod): correctly fetch the current locale,
+       fix from owen.
+
 1999-12-16  Tor Lillqvist  <tml@iki.fi>
 
        * gmodule/gmodule-win32.c: Use FormatMessage to translate system
index e43e739..ef72dca 100644 (file)
@@ -1,3 +1,8 @@
+Sun Jan  9 13:28:36 2000  Tim Janik  <timj@gtk.org>
+
+       * gstrfuncs.c (g_strtod): correctly fetch the current locale,
+       fix from owen.
+
 1999-12-16  Tor Lillqvist  <tml@iki.fi>
 
        * gmodule/gmodule-win32.c: Use FormatMessage to translate system
index 99ce93a..e549260 100644 (file)
@@ -200,9 +200,11 @@ g_strtod (const gchar *nptr,
     {
       gchar *old_locale;
 
-      old_locale = setlocale (LC_NUMERIC, "C");
+      old_locale = g_strdup (setlocale (LC_NUMERIC, NULL));
+      setlocale (LC_NUMERIC, "C");
       val_2 = strtod (nptr, &fail_pos_2);
       setlocale (LC_NUMERIC, old_locale);
+      g_free (old_locale);
     }
 
   if (!fail_pos_1 || fail_pos_1[0] == 0 || fail_pos_1 >= fail_pos_2)
index 99ce93a..e549260 100644 (file)
@@ -200,9 +200,11 @@ g_strtod (const gchar *nptr,
     {
       gchar *old_locale;
 
-      old_locale = setlocale (LC_NUMERIC, "C");
+      old_locale = g_strdup (setlocale (LC_NUMERIC, NULL));
+      setlocale (LC_NUMERIC, "C");
       val_2 = strtod (nptr, &fail_pos_2);
       setlocale (LC_NUMERIC, old_locale);
+      g_free (old_locale);
     }
 
   if (!fail_pos_1 || fail_pos_1[0] == 0 || fail_pos_1 >= fail_pos_2)