diff options
| author | J.T. Conklin <jtc@FreeBSD.org> | 1993-07-30 20:16:53 +0000 |
|---|---|---|
| committer | J.T. Conklin <jtc@FreeBSD.org> | 1993-07-30 20:16:53 +0000 |
| commit | 6eefa612a977ece8f5e118392b27413260cb6996 (patch) | |
| tree | e01cf2a5cc6062467dbb628a7beef06eaa39845d /gnu/lib/libregex/doc/include.awk | |
| parent | ff5c17099b72eefef1c4274236e4c3e1f344437f (diff) | |
Notes
Diffstat (limited to 'gnu/lib/libregex/doc/include.awk')
| -rw-r--r-- | gnu/lib/libregex/doc/include.awk | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gnu/lib/libregex/doc/include.awk b/gnu/lib/libregex/doc/include.awk new file mode 100644 index 000000000000..a1df3f84634f --- /dev/null +++ b/gnu/lib/libregex/doc/include.awk @@ -0,0 +1,19 @@ +# Assume `source' is set with -vsource=filename on the command line. +# +/^\[\[\[/ { inclusion = $2; # name of the thing to include. + printing = 0; + while ((getline line < source) > 0) + { + if (match (line, "\\[\\[\\[end " inclusion "\\]\\]\\]")) + printing = 0; + + if (printing) + print line; + + if (match (line,"\\[\\[\\[begin " inclusion "\\]\\]\\]")) + printing = 1; + } + close (source); + next; + } + { print } |
