]> www.fi.muni.cz Git - evince.git/blobdiff - pdf/goo/parseargs.c
file cursor-hand-open.png was initially added on branch gpdf-modes.
[evince.git] / pdf / goo / parseargs.c
index ad8460ae89385453b795c32998ab203ae922caa1..6bcde2c291b94548427000c208b6b50dd03a5f11 100644 (file)
@@ -3,9 +3,10 @@
  *
  * Command line argument parser.
  *
- * Copyright 1996-2002 Glyph & Cog, LLC
+ * Copyright 1996-2003 Glyph & Cog, LLC
  */
 
+#include <locale.h>
 #include <stdio.h>
 #include <stddef.h>
 #include <string.h>
@@ -117,7 +118,11 @@ static GBool grabArg(ArgDesc *arg, int i, int *argc, char *argv[]) {
     break;
   case argFP:
     if (i + 1 < *argc && isFP(argv[i+1])) {
-      *(double *)arg->val = atof(argv[i+1]);
+      {
+        char *theLocale = setlocale(LC_NUMERIC, "C");
+        *(double *)arg->val = atof(argv[i+1]);
+        setlocale(LC_NUMERIC, theLocale);
+      }
       n = 2;
     } else {
       ok = gFalse;