aboutsummaryrefslogtreecommitdiffstats
path: root/helpers/chlistref.awk
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2014-09-10 08:18:21 +0300
committerArnold D. Robbins <arnold@skeeve.com>2014-09-10 08:18:21 +0300
commit6de0102373304c0fdf70a7ddeb17dd1caa3a9b23 (patch)
tree7a8f3f18180e0b84893a4cccd883c80ffb7d9bc0 /helpers/chlistref.awk
parentd7c8dfd41bd5671ddfa6c81b2ef1779cab06e56b (diff)
parentca9f23d6c33c4b5cb3786d480948a42988ca99ac (diff)
downloadegawk-6de0102373304c0fdf70a7ddeb17dd1caa3a9b23.tar.gz
egawk-6de0102373304c0fdf70a7ddeb17dd1caa3a9b23.tar.bz2
egawk-6de0102373304c0fdf70a7ddeb17dd1caa3a9b23.zip
Merge branch 'master' into comment
Diffstat (limited to 'helpers/chlistref.awk')
-rw-r--r--helpers/chlistref.awk31
1 files changed, 31 insertions, 0 deletions
diff --git a/helpers/chlistref.awk b/helpers/chlistref.awk
new file mode 100644
index 00000000..49f63f59
--- /dev/null
+++ b/helpers/chlistref.awk
@@ -0,0 +1,31 @@
+BEGIN {
+ chapters["Getting Started"]++
+ chapters["Invoking Gawk"]++
+ chapters["Regexp"]++
+ chapters["Reading Files"]++
+ chapters["Printing"]++
+ chapters["Expressions"]++
+ chapters["Patterns and Actions"]++
+ chapters["Arrays"]++
+ chapters["Functions"]++
+ chapters["Library Functions"]++
+ chapters["Sample Programs"]++
+ chapters["Advanced Features"]++
+ chapters["Internationalization"]++
+ chapters["Debugger"]++
+ chapters["Arbitrary Precision Arithmetic"]++
+ chapters["Dynamic Extensions"]++
+ chapters["Language History"]++
+ chapters["Installation"]++
+ chapters["Notes"]++
+ chapters["Basic Concepts"]++
+
+ Pattern = ".*@ref\\{([^}]+)\\},.*"
+}
+
+$0 ~ Pattern {
+ ref = gensub(Pattern, "\\1", 1, $0)
+ if (! (ref in chapters))
+ printf("%s:%d: %s\n", FILENAME, FNR, $0)
+}
+