Commit | Line | Data |
---|---|---|
78ed81a3 | 1 | # Assume `source' is set with -vsource=filename on the command line. |
2 | # | |
3 | /^\[\[\[/ { inclusion = $2; # name of the thing to include. | |
4 | printing = 0; | |
5 | while ((getline line < source) > 0) | |
6 | { | |
7 | if (match (line, "\\[\\[\\[end " inclusion "\\]\\]\\]")) | |
8 | printing = 0; | |
9 | ||
10 | if (printing) | |
11 | print line; | |
12 | ||
13 | if (match (line,"\\[\\[\\[begin " inclusion "\\]\\]\\]")) | |
14 | printing = 1; | |
15 | } | |
16 | close (source); | |
17 | next; | |
18 | } | |
19 | { print } |