diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2002-02-16 18:31:14 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2002-02-16 18:31:14 +0000 |
commit | 21ac424e41c06b76fd52cef3d26c279d29e6b9fe (patch) | |
tree | a9450b98bf5717731112bcb38acf092eefc002c9 /examples | |
parent | e07fabae6297b61dca13a53a41dee8b6402f42fa (diff) | |
download | gdk-pixbuf-21ac424e41c06b76fd52cef3d26c279d29e6b9fe.tar.gz |
rearrange rules to not emit the example start and end markers.
* examples/extract.awk: rearrange rules to not emit the example
start and end markers.
* docs/tutorial/gtk-tut.sgml: turn the start and end markers into
SGML comments, so they don't clutter the formatted tutorial.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/extract.awk | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/examples/extract.awk b/examples/extract.awk index 25025f8e5..a1efd673c 100644 --- a/examples/extract.awk +++ b/examples/extract.awk @@ -31,6 +31,15 @@ BEGIN {in_example=0; check=0; spec_example=""; do_output=0; flatten=0; verbose=0 } } +$2 == "example-end" && in_example == 0 { printf("\nERROR: multiple ends at line %d\n", NR) > "/dev/stderr"; + exit} +$2 == "example-end" { in_example=0; do_output=0 } + +in_example==1 && check==0 && do_output==1 { gsub(/&/, "\\&", $0); + gsub(/</, "<", $0); + gsub(/>/, ">", $0); + print $0 >file_name } + $2 == "example-start" && in_example == 1 { printf("\nERROR: nested example at line %d\n", NR) > "/dev/stderr"; exit} @@ -53,15 +62,6 @@ $2 == "example-start" && check == 0 \ } } -in_example==1 && check==0 && do_output==1 { gsub(/&/, "\\&", $0); - gsub(/</, "<", $0); - gsub(/>/, ">", $0); - print $0 >file_name } - -$2 == "example-end" && in_example == 0 { printf("\nERROR: multiple ends at line %d\n", NR) > "/dev/stderr"; - exit} -$2 == "example-end" { in_example=0; do_output=0 } - END {} |