aboutsummaryrefslogtreecommitdiffstats
path: root/helpers/chlistref.awk
diff options
context:
space:
mode:
authorStephen Davies <sdavies@sdc.com.au>2014-09-11 16:26:34 +0930
committerStephen Davies <sdavies@sdc.com.au>2014-09-11 16:26:34 +0930
commit33acaac51cd9087eb7a9b7e73c11f58da396df9a (patch)
tree31f31fcbddca399940865007322bdeea81f2f6f7 /helpers/chlistref.awk
parent9b21de890a81179e951ffa5bea2099673f584b16 (diff)
parentca9f23d6c33c4b5cb3786d480948a42988ca99ac (diff)
downloadegawk-33acaac51cd9087eb7a9b7e73c11f58da396df9a.tar.gz
egawk-33acaac51cd9087eb7a9b7e73c11f58da396df9a.tar.bz2
egawk-33acaac51cd9087eb7a9b7e73c11f58da396df9a.zip
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/gawk
Conflicts: doc/gawk.info
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)
+}
+