diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2014-09-04 09:40:09 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2014-09-04 09:40:09 +0300 |
commit | 8beb9796b17b6ca48eb62df8fd3d31421e43c761 (patch) | |
tree | 030405b2398ce8c7333b561bb65586a62111a617 /helpers/chlistref.awk | |
parent | 611353597e20081bd0c72617e24fa5ff4c63dac1 (diff) | |
download | egawk-8beb9796b17b6ca48eb62df8fd3d31421e43c761.tar.gz egawk-8beb9796b17b6ca48eb62df8fd3d31421e43c761.tar.bz2 egawk-8beb9796b17b6ca48eb62df8fd3d31421e43c761.zip |
New helper file, chlistref.awk.
Diffstat (limited to 'helpers/chlistref.awk')
-rw-r--r-- | helpers/chlistref.awk | 31 |
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) +} + |