summaryrefslogtreecommitdiff
path: root/usr.bin/awk/lib.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2023-09-10 14:59:01 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2023-09-10 14:59:01 +0000
commit2d5f961ef8d17ca41d345188c8c5f5186f4e5b7c (patch)
treed352db105ee16eda7f3bd3a8fde736da6e962b1b /usr.bin/awk/lib.c
parentbc7f3c9886837c8e035c7c115d10dd6578aded72 (diff)
Update awk to Sep 6, 2023 version.
Diffstat (limited to 'usr.bin/awk/lib.c')
-rw-r--r--usr.bin/awk/lib.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/usr.bin/awk/lib.c b/usr.bin/awk/lib.c
index 87cc78ea58a..90d34a7eff1 100644
--- a/usr.bin/awk/lib.c
+++ b/usr.bin/awk/lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lib.c,v 1.49 2022/09/01 15:21:28 millert Exp $ */
+/* $OpenBSD: lib.c,v 1.50 2023/09/10 14:59:00 millert Exp $ */
/****************************************************************
Copyright (C) Lucent Technologies 1997
All Rights Reserved
@@ -148,11 +148,6 @@ int getrec(char **pbuf, int *pbufsize, bool isrecord) /* get next input record *
}
DPRINTF("RS=<%s>, FS=<%s>, ARGC=%g, FILENAME=%s\n",
*RS, *FS, *ARGC, *FILENAME);
- if (isrecord) {
- donefld = false;
- donerec = true;
- savefs();
- }
saveb0 = buf[0];
buf[0] = 0;
while (argno < *ARGC || infile == stdin) {
@@ -192,6 +187,9 @@ int getrec(char **pbuf, int *pbufsize, bool isrecord) /* get next input record *
fldtab[0]->fval = result;
fldtab[0]->tval |= NUM;
}
+ donefld = false;
+ donerec = true;
+ savefs();
}
setfval(nrloc, nrloc->fval+1);
setfval(fnrloc, fnrloc->fval+1);