diff options
| author | cgd <cgd@NetBSD.org> | 1993-04-08 01:12:23 +0000 |
|---|---|---|
| committer | cgd <cgd@NetBSD.org> | 1993-04-08 01:12:23 +0000 |
| commit | 744d9dbe7586da9c80a9560dd1127d68cfeaf055 (patch) | |
| tree | 0afe639b6c184817f0f312128f2681a0223fb616 /gnu/lib/libregex/doc/include.awk | |
| parent | 09208352b3d8b20e05dffc9bca2a7be80a0e537b (diff) | |
gnu regex 0.12
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 00000000000..a1df3f84634 --- /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 } |
