entry in ARGV (since circa 1989). From Miguel Pineiro Jr.
-/* $OpenBSD: FIXES,v 1.44 2022/06/03 19:40:56 millert Exp $ */
+/* $OpenBSD: FIXES,v 1.45 2022/06/03 19:42:27 millert Exp $ */
/****************************************************************
Copyright (C) Lucent Technologies 1997
All Rights Reserved
This file lists all bug fixes, changes, etc., made since the AWK book
was sent to the printers in August, 1987.
+Mar 14, 2022:
+ The fulfillment of an assignment operand had been truncating its
+ entry in ARGV (since circa 1989). Thanks to Miguel Pineiro Jr.
+ <mpj@pineiro.cc>.
+
Mar 3, 2022:
Fixed file management memory leak that appears to have been
there since the files array was first initialized with stdin,
-/* $OpenBSD: lib.c,v 1.47 2021/11/02 15:29:41 millert Exp $ */
+/* $OpenBSD: lib.c,v 1.48 2022/06/03 19:42:27 millert Exp $ */
/****************************************************************
Copyright (C) Lucent Technologies 1997
All Rights Reserved
void setclvar(char *s) /* set var=value from s */
{
- char *p;
+ char *e, *p;
Cell *q;
double result;
for (p=s; *p != '='; p++)
;
+ e = p;
*p++ = 0;
p = qstring(p, '\0');
q = setsymtab(s, p, 0.0, STR, symtab);
q->tval |= NUM;
}
DPRINTF("command line set %s to |%s|\n", s, p);
+ *e = '=';
}
-/* $OpenBSD: main.c,v 1.52 2022/06/03 19:40:56 millert Exp $ */
+/* $OpenBSD: main.c,v 1.53 2022/06/03 19:42:27 millert Exp $ */
/****************************************************************
Copyright (C) Lucent Technologies 1997
All Rights Reserved
THIS SOFTWARE.
****************************************************************/
-const char *version = "version 20220303";
+const char *version = "version 20220314";
#define DEBUG
#include <stdio.h>