aboutsummaryrefslogtreecommitdiff
path: root/src/pj_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pj_init.c')
-rw-r--r--src/pj_init.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pj_init.c b/src/pj_init.c
index 6b70d62b..2d84ef3f 100644
--- a/src/pj_init.c
+++ b/src/pj_init.c
@@ -34,6 +34,7 @@
#include <stdio.h>
#include <string.h>
#include <errno.h>
+#include <locale.h>
PJ_CVSID("$Id$");
@@ -225,10 +226,14 @@ pj_init(int argc, char **argv) {
paralist *curr;
int i;
PJ *PIN = 0;
+ const char *old_locale;
errno = pj_errno = 0;
start = NULL;
+ old_locale = setlocale(LC_NUMERIC, NULL);
+ setlocale(LC_NUMERIC,"C");
+
/* put arguments into internal linked list */
if (argc <= 0) { pj_errno = -1; goto bum_call; }
for (i = 0; i < argc; ++i)
@@ -377,6 +382,8 @@ bum_call: /* cleanup error return */
}
PIN = 0;
}
+ setlocale(LC_NUMERIC,old_locale);
+
return PIN;
}