Module Name: src
Committed By: christos
Date: Sun Nov 15 21:56:06 UTC 2009
Modified Files:
src/dist/nawk: main.c
Log Message:
PR/42320: Alexander Nasonov: According to:
http://www.opengroup.org/onlinepubs/7990989775/xcu/awk.html
the LC_NUMERIC decimal point recognized is always period. Make it so.
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/dist/nawk/main.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/dist/nawk/main.c
diff -u src/dist/nawk/main.c:1.9 src/dist/nawk/main.c:1.10
--- src/dist/nawk/main.c:1.9 Sun Mar 1 18:30:52 2009
+++ src/dist/nawk/main.c Sun Nov 15 16:56:06 2009
@@ -35,7 +35,6 @@
#include <stdlib.h>
#include <string.h>
#include <signal.h>
-#include <locale.h>
#include "awk.h"
#include "awkgram.h"
@@ -102,6 +101,7 @@
int main(int argc, char *argv[])
{
const char *fs = NULL;
+ struct lconv *lconv;
setlocale(LC_CTYPE, "");
setlocale(LC_NUMERIC, "C"); /* for parsing cmdline & prog */
@@ -114,6 +114,9 @@
}
(void) setlocale(LC_ALL, "");
+ lconv = localeconv();
+ lconv->decimal_point = ".";
+
#ifdef SA_SIGINFO
{