aboutsummaryrefslogtreecommitdiffstats
path: root/doc/gawktexi.in
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2018-05-31 12:57:02 +0300
committerArnold D. Robbins <arnold@skeeve.com>2018-05-31 12:57:02 +0300
commitf006165d77037b99e205496d8b79cb80e9f280c0 (patch)
tree401b27c8f6e7adedb327efab040c93581016bea5 /doc/gawktexi.in
parent17453df8b1ba435161b29ca7e8cf266d0fbaf4ac (diff)
downloadegawk-f006165d77037b99e205496d8b79cb80e9f280c0.tar.gz
egawk-f006165d77037b99e205496d8b79cb80e9f280c0.tar.bz2
egawk-f006165d77037b99e205496d8b79cb80e9f280c0.zip
Further fixes to extract.awk.
Diffstat (limited to 'doc/gawktexi.in')
-rw-r--r--doc/gawktexi.in7
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index c645a8ec..e857747e 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -25741,7 +25741,7 @@ line. That line is then printed to the output file:
@}
if ($3 != curfile) @{
if (curfile != "")
- filelist[curfile]++ # save to close later
+ filelist[curfile] = 1 # save to close later
curfile = $3
@}
@@ -25798,8 +25798,9 @@ is finished:
@c file eg/prog/extract.awk
@group
END @{
- for (f in filelist)
- close(filelist[f])
+ close(curfile) # close the last one
+ for (f in filelist) # close all the rest
+ close(f)
@}
@end group
@c endfile