summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-25 00:43:56 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-25 00:43:56 -0300
commit9c3c58c5b1115a7b2205ac4997c3c7e78e2f438d (patch)
tree4f22e30ba0703050c7a121c493eb9ea21ca00fcb
parentf145098fcfc2d9290a5de2fa53525499eba70c2c (diff)
downloadeeshow-9c3c58c5b1115a7b2205ac4997c3c7e78e2f438d.tar.gz
eeshow-9c3c58c5b1115a7b2205ac4997c3c7e78e2f438d.tar.bz2
eeshow-9c3c58c5b1115a7b2205ac4997c3c7e78e2f438d.zip
main.c (main): select C locale
Else we fail to parse things containing decimal points.
-rw-r--r--main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.c b/main.c
index 92e371e..142a873 100644
--- a/main.c
+++ b/main.c
@@ -16,6 +16,7 @@
#include <stdio.h>
#include <unistd.h>
#include <string.h>
+#include <locale.h>
#include <gtk/gtk.h>
@@ -154,6 +155,8 @@ int main(int argc, char **argv)
return 1;
}
+ setlocale(LC_ALL, "C"); /* restore sanity */
+
for (dashdash = 1; dashdash != argc; dashdash++)
if (!strcmp(argv[dashdash], "--")) {
have_dashdash = 1;