From 6dc6ebbf44f01f31b683ddde36f0ba694b98bbdd Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 1 Jan 2007 23:53:12 +0000 Subject: awk: undo locale setting for numbers - or else parsing can act quite mysteriously date: add if(ENABLE_LOCALE_SUPPORT) --- editors/awk.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'editors') diff --git a/editors/awk.c b/editors/awk.c index 97e78163c..f48b0e43f 100644 --- a/editors/awk.c +++ b/editors/awk.c @@ -2652,6 +2652,11 @@ int awk_main(int argc, char **argv) char *vnames = (char *)vNames; /* cheat */ char *vvalues = (char *)vValues; + /* Undo busybox.c, or else strtod may eat ','! This breaks parsing: + * $1,$2 == '$1,' '$2', NOT '$1' ',' '$2' */ + if (ENABLE_LOCALE_SUPPORT) + setlocale(LC_NUMERIC, "C"); + zero_out_var(&tv); /* allocate global buffer */ -- cgit v1.2.3