shithub: trueawk

Download patch

ref: 4189ef5d585f54879014a00263300b9dfc7e128c
parent: 89354cc23057158fa4feb566e46513ca5c44ac3b
author: Arnold D. Robbins <arnold@skeeve.com>
date: Wed May 29 17:04:18 EDT 2019

Fix Issue #38 - don't require non-= after = in cmd line assignment.

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-05-29         Arnold D. Robbins     <arnold@skeeve.com>
+
+	* lib.c (isclvar): Remove check for additional '=' after
+	first one. No longer needed.
+
 2019-01-26         Arnold D. Robbins     <arnold@skeeve.com>
 
 	* main.c (version): Updated.
--- a/FIXES
+++ b/FIXES
@@ -25,6 +25,12 @@
 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
--- a/lib.c
+++ b/lib.c
@@ -703,7 +703,7 @@
 	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 */
--- a/main.c
+++ b/main.c
@@ -22,7 +22,7 @@
 THIS SOFTWARE.
 ****************************************************************/
 
-const char	*version = "version 20190305";
+const char	*version = "version 20190529";
 
 #define DEBUG
 #include <stdio.h>
--