commit ebc9d200a03cd4cf81f614f5dafe8873dbc8a8bd from: Omar Polo date: Sun Dec 04 16:37:09 2022 UTC template: don't automatically include tmpl.h anymore commit - 14d86fd9156dd2aecbc0af532359e7fc3207415a commit + ebc9d200a03cd4cf81f614f5dafe8873dbc8a8bd blob - f6ff16ddf36ba82a8f3d8c475da40bac90745b50 blob + c35618a4287faab518c419c4bbbe06ecbca7f157 --- template/regress/02-only-verbatim.tmpl +++ template/regress/02-only-verbatim.tmpl @@ -1,5 +1,9 @@ -{! #include !} +{! +#include +#include "tmpl.h" +!} + noise {! /* woops */ !} here blob - 59c8445f7cbb514f0ac71243231534fa2ce8aa50 blob + d866f69531b2f1248c5bb6940f9b8c40adf87c82 --- template/regress/03-block.tmpl +++ template/regress/03-block.tmpl @@ -1,5 +1,9 @@ -{! #include !} +{! +#include +#include "tmpl.h" +!} + {{ define base(struct template *tp, const char *title) }} {! char *foo = NULL; !} blob - 4b378ef895124815cb89173a7604d0c8630d3bed blob + aa8c5edc9b8934fea4803f8b465a7f00fb389e23 --- template/regress/04-flow.tmpl +++ template/regress/04-flow.tmpl @@ -1,6 +1,8 @@ {! #include #include + +#include "tmpl.h" !} {{ define base(struct template *tp, const char *title) }} blob - dd96702b6b6d728f77177f953de0319b5fc8c5a8 blob + d47673dc5bf15202d96329fe8d971d117bc930eb --- template/regress/05-loop.tmpl +++ template/regress/05-loop.tmpl @@ -2,6 +2,7 @@ #include #include #include "lists.h" +#include "tmpl.h" int list(struct template *, struct tailhead *); blob - 50bf6c0ec4dfcaec1fd63cba01c46d176957b614 blob + f5450fbc2e7134e6fb5f5798e14983545f6347d4 --- template/regress/06-escape.tmpl +++ template/regress/06-escape.tmpl @@ -1,5 +1,9 @@ -{! #include !} +{! +#include +#include "tmpl.h" +!} + {{ define base(struct template *tp, const char *title) }} blob - b650ecf17c6935f219a6d2b7a016aa61f44c394d blob + 8b48d50f1257a72de04bbd33038320dd05edca49 --- template/regress/07-printf.tmpl +++ template/regress/07-printf.tmpl @@ -1,6 +1,8 @@ {! #include #include + +#include "tmpl.h" !} {{ define base(struct template *tp, const char *title) }} blob - 4523900dafb6c0234fe51206179c62bcf68cd2c9 blob + f52199db7b8acc13c6f1a44dc1cf4222b189b3e7 --- template/template.c +++ template/template.c @@ -63,9 +63,6 @@ main(int argc, char **argv) if (pledge(out ? "stdio rpath cpath" : "stdio rpath", NULL) == -1) err(1, "pledge"); - /* preamble */ - fprintf(fp, "#include \"tmpl.h\"\n"); - if (argc == 0) { nodebug = 1; if (parse(fp, "/dev/stdin") == -1)