From 4189ef5d585f54879014a00263300b9dfc7e128c Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 29 May 2019 21:04:18 +0300 Subject: [PATCH] Fix Issue #38 - don't require non-= after = in cmd line assignment. --- ChangeLog | 5 +++++ FIXES | 6 ++++++ lib.c | 2 +- main.c | 2 +- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7516cd6..fd03b2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2019-05-29 Arnold D. Robbins + + * lib.c (isclvar): Remove check for additional '=' after + first one. No longer needed. + 2019-01-26 Arnold D. Robbins * main.c (version): Updated. diff --git a/FIXES b/FIXES index bbadc29..183eaed 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. +May 29,2019: + Fix check for command line arguments to no longer require that + first character after '=' not be another '='. Reverts change of + August 11, 1989. Thanks to GitHub user Jamie Landeg Jones for + pointing out the issue; from Issue #38. + Apr 7, 2019: Update awktest.tar(p.50) to use modern options to sort. Needed for Android development. Thanks to GitHub user mohd-akram (Mohamed diff --git a/lib.c b/lib.c index f9cb6ca..a365245 100644 --- a/lib.c +++ b/lib.c @@ -703,7 +703,7 @@ int isclvar(const char *s) /* is s of form var=something ? */ for ( ; *s; s++) if (!(isalnum((uschar) *s) || *s == '_')) break; - return *s == '=' && s > os && *(s+1) != '='; + return *s == '=' && s > os; } /* strtod is supposed to be a proper test of what's a valid number */ diff --git a/main.c b/main.c index f06e734..98661fc 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 20190305"; +const char *version = "version 20190529"; #define DEBUG #include