From 2017c2e6eaa6a0d5a3e1ad2c9c891e82411dca83 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 28 Feb 2020 13:47:42 +0200 Subject: [PATCH] Fixes from Christo Zoulas. --- FIXES | 6 ++++++ main.c | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/FIXES b/FIXES index 56f72d8..4342917 100644 --- a/FIXES +++ b/FIXES @@ -25,6 +25,12 @@ THIS SOFTWARE. This file lists all bug fixes, changes, etc., made since the AWK book was sent to the printers in August, 1987. +February 28, 2020: + More cleanups from Christos Zoulas: notably backslash continuation + inside strings removes the newline and a fix for RS = "^a". + Fix for address sanitizer-found problem. Thanks to GitHub user + enh-google. + February 19, 2020: More small cleanups from Christos Zoulas. diff --git a/main.c b/main.c index 836783c..643ff7a 100644 --- a/main.c +++ b/main.c @@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************************************************/ -const char *version = "version 20200219"; +const char *version = "version 20200228"; #define DEBUG #include @@ -214,6 +214,11 @@ int main(int argc, char *argv[]) if (!safe) envinit(environ); yyparse(); +#if 0 + // Doing this would comply with POSIX, but is not compatible with + // other awks and with what most users expect. So comment it out. + setlocale(LC_NUMERIC, ""); /* back to whatever it is locally */ +#endif if (fs) *FS = qstring(fs, '\0'); dprintf( ("errorflag=%d\n", errorflag) );