aboutsummaryrefslogtreecommitdiffstats
path: root/awklib/eg/prog
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2010-11-12 12:23:33 +0200
committerArnold D. Robbins <arnold@skeeve.com>2010-11-12 12:23:33 +0200
commit40b3741f63c19e38077d57f4ce4737916ec5073e (patch)
tree89e086fabdfc738b379901d86733e6c260c22f35 /awklib/eg/prog
parent00ef0423acd97cb964a2bae54c93a03a8ab50e5e (diff)
downloadegawk-40b3741f63c19e38077d57f4ce4737916ec5073e.tar.gz
egawk-40b3741f63c19e38077d57f4ce4737916ec5073e.tar.bz2
egawk-40b3741f63c19e38077d57f4ce4737916ec5073e.zip
Bring in development gawk changes.
Diffstat (limited to 'awklib/eg/prog')
-rw-r--r--awklib/eg/prog/wc.awk4
1 files changed, 2 insertions, 2 deletions
diff --git a/awklib/eg/prog/wc.awk b/awklib/eg/prog/wc.awk
index 8fb48164..d51b9ff2 100644
--- a/awklib/eg/prog/wc.awk
+++ b/awklib/eg/prog/wc.awk
@@ -34,14 +34,14 @@ BEGIN {
}
function beginfile(file)
{
- chars = lines = words = 0
+ lines = words = chars = 0
fname = FILENAME
}
function endfile(file)
{
- tchars += chars
tlines += lines
twords += words
+ tchars += chars
if (do_lines)
printf "\t%d", lines
if (do_words)