aboutsummaryrefslogtreecommitdiffstats
path: root/awklib/eg/prog/extract.awk
diff options
context:
space:
mode:
Diffstat (limited to 'awklib/eg/prog/extract.awk')
-rw-r--r--awklib/eg/prog/extract.awk12
1 files changed, 8 insertions, 4 deletions
diff --git a/awklib/eg/prog/extract.awk b/awklib/eg/prog/extract.awk
index 65f3f2d2..5cb191ae 100644
--- a/awklib/eg/prog/extract.awk
+++ b/awklib/eg/prog/extract.awk
@@ -1,6 +1,9 @@
# extract.awk --- extract files and run programs
# from texinfo files
-# Arnold Robbins, arnold@gnu.org, Public Domain, May 1993
+#
+# Arnold Robbins, arnold@gnu.org, Public Domain
+# May 1993
+# Revised September 2000
BEGIN { IGNORECASE = 1 }
@@ -41,6 +44,8 @@ BEGIN { IGNORECASE = 1 }
break
else if (line ~ /^@(end[ \t]+)?group/)
continue
+ else if (line ~ /^@c(omment+)?[ \t]+/)
+ continue
if (index(line, "@") == 0) {
print line > curfile
continue
@@ -58,9 +63,8 @@ BEGIN { IGNORECASE = 1 }
print join(a, 1, n, SUBSEP) > curfile
}
}
-function unexpected_eof()
-{
- printf("%s:%d: unexpected EOF or error\n", \
+function unexpected_eof() {
+ printf("%s:%d: unexpected EOF or error\n",
FILENAME, FNR) > "/dev/stderr"
exit 1
}