aboutsummaryrefslogtreecommitdiffstats
path: root/doc/gawk.texi
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2018-05-31 12:59:16 +0300
committerArnold D. Robbins <arnold@skeeve.com>2018-05-31 12:59:16 +0300
commitbc61f29c492b480545ae31b4b5709f76fe3710b0 (patch)
tree0d4989b4bcca2c94fc59c526fcf476912ab78a49 /doc/gawk.texi
parentb8213e3abbd39a851b1510b39b7155b022b02d99 (diff)
parentbe0e2af1588b358353941eff27c5ef06da2c90b3 (diff)
downloadegawk-bc61f29c492b480545ae31b4b5709f76fe3710b0.tar.gz
egawk-bc61f29c492b480545ae31b4b5709f76fe3710b0.tar.bz2
egawk-bc61f29c492b480545ae31b4b5709f76fe3710b0.zip
Merge branch 'master' into feature/fix-comments
Diffstat (limited to 'doc/gawk.texi')
-rw-r--r--doc/gawk.texi7
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/gawk.texi b/doc/gawk.texi
index a0db1577..eaa1e923 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -26728,7 +26728,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
@}
@@ -26785,8 +26785,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