From a67838992c22eaa752bafc692140cab8d3c3976b Mon Sep 17 00:00:00 2001 From: tribby Date: Mon, 9 Mar 1998 23:43:53 +0000 Subject: [PATCH] Reflect changes made in the latest Bell Labs version (980211). No GNO/ME changes have been added yet. --- usr.bin/awk/FIXES | 11 +++++++++++ usr.bin/awk/awk.1 | 14 -------------- usr.bin/awk/lex.c | 2 +- usr.bin/awk/main.c | 2 +- usr.bin/awk/maketab.c | 2 +- usr.bin/awk/proto.h | 2 +- usr.bin/awk/run.c | 2 +- 7 files changed, 16 insertions(+), 19 deletions(-) diff --git a/usr.bin/awk/FIXES b/usr.bin/awk/FIXES index a1c4c47..b7430bf 100644 --- a/usr.bin/awk/FIXES +++ b/usr.bin/awk/FIXES @@ -544,3 +544,14 @@ Aug 21, 1997: the behavior is the same as gawk and the intended posix standard. thanks to arnold robbins for advice here. +Aug 31, 1997: + s/adelete/awkdelete/: SGI uses this in malloc.h. + thanks to nelson beebe for pointing this one out. + +Feb 11, 1998: + subtle silent bug in lex.c: if the program ended with a number + longer than 1 digit, part of the input would be pushed back and + parsed again because token buffer wasn't terminated right. + example: awk 'length($0) > 10'. blush. at least i found it + myself. + diff --git a/usr.bin/awk/awk.1 b/usr.bin/awk/awk.1 index b54d27c..6119613 100644 --- a/usr.bin/awk/awk.1 +++ b/usr.bin/awk/awk.1 @@ -23,12 +23,6 @@ awk \- pattern-directed scanning and processing language .I var=value ] [ -.BI \-mr n -] -[ -.BI \-mf n -] -[ .I 'prog' | .BI \-f @@ -93,14 +87,6 @@ If .BR FS is null, the input line is split into one field per character. .PP -To compensate for inadequate implementation of storage management, -the -.B \-mr -option can be used to set the maximum size of the input record, -and the -.B \-mf -option to set the maximum number of fields. -.PP A pattern-action statement has the form .IP .IB pattern " { " action " } diff --git a/usr.bin/awk/lex.c b/usr.bin/awk/lex.c index e6e3a95..a942fe0 100644 --- a/usr.bin/awk/lex.c +++ b/usr.bin/awk/lex.c @@ -143,11 +143,11 @@ int gettok(char **pbuf, int *psz) /* get next input token */ || c == '.' || c == '+' || c == '-') *bp++ = c; else { - *bp = 0; unput(c); break; } } + *bp = 0; strtod(buf, &rem); /* parse the number */ unputstr(rem); /* put rest back for later */ rem[0] = 0; diff --git a/usr.bin/awk/main.c b/usr.bin/awk/main.c index 2a44d38..0eed1af 100644 --- a/usr.bin/awk/main.c +++ b/usr.bin/awk/main.c @@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************************************************/ -char *version = "version 970821"; +char *version = "version 980211"; #define DEBUG #include diff --git a/usr.bin/awk/maketab.c b/usr.bin/awk/maketab.c index d3fc37e..20e4a0b 100644 --- a/usr.bin/awk/maketab.c +++ b/usr.bin/awk/maketab.c @@ -77,7 +77,7 @@ struct xx { PRINTF, "awkprintf", "printf" }, { PRINT, "printstat", "print" }, { CLOSE, "closefile", "closefile" }, - { DELETE, "adelete", "adelete" }, + { DELETE, "awkdelete", "awkdelete" }, { SPLIT, "split", "split" }, { ASSIGN, "assign", " = " }, { ADDEQ, "assign", " += " }, diff --git a/usr.bin/awk/proto.h b/usr.bin/awk/proto.h index 3f9e5d9..6439b04 100644 --- a/usr.bin/awk/proto.h +++ b/usr.bin/awk/proto.h @@ -145,7 +145,7 @@ extern Cell *jump(Node **, int); extern Cell *getline(Node **, int); extern Cell *getnf(Node **, int); extern Cell *array(Node **, int); -extern Cell *adelete(Node **, int); +extern Cell *awkdelete(Node **, int); extern Cell *intest(Node **, int); extern Cell *matchop(Node **, int); extern Cell *boolop(Node **, int); diff --git a/usr.bin/awk/run.c b/usr.bin/awk/run.c index aa4a818..6427848 100644 --- a/usr.bin/awk/run.c +++ b/usr.bin/awk/run.c @@ -471,7 +471,7 @@ Cell *array(Node **a, int n) /* a[0] is symtab, a[1] is list of subscripts */ return(z); } -Cell *adelete(Node **a, int n) /* a[0] is symtab, a[1] is list of subscripts */ +Cell *awkdelete(Node **a, int n) /* a[0] is symtab, a[1] is list of subscripts */ { Cell *x, *y; Node *np;