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

This commit is contained in:
Arnold D. Robbins 2019-05-29 21:04:18 +03:00
parent 89354cc230
commit 4189ef5d58
4 changed files with 13 additions and 2 deletions

View File

@ -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.

6
FIXES
View File

@ -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

2
lib.c
View File

@ -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 */

2
main.c
View File

@ -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 <stdio.h>