saait

Simple static page generator
git clone https://git.sinitax.com/codemadness/saait
Log | Files | Refs | README | LICENSE | Upstream | sfeed.txt

commit 555edeb4eca525612f5d5016f131896f447be159
parent c2be3b96ecb51bc1dc1180c15ad0e9a1145b50f5
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Mon,  4 Dec 2017 23:16:56 +0100

remove ability to include files with %{}

this might come back later (if needed) in a more optimized form.

Diffstat:
MREADME | 1-
Msaait.c | 11-----------
2 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/README b/README @@ -52,7 +52,6 @@ filename (can be overwritten) basename of output content HTML file. Variables: ${} escaped HTML/XML string. #{} literal string. -%{} insert contents of file of variable value. Usage: diff --git a/saait.c b/saait.c @@ -253,7 +253,6 @@ writepage(FILE *fp, const char *filename, struct variable *c, char *s) for (; *s; s++) { op = *s; switch (*s) { - case '%': /* insert contents of filename set in variable */ case '#': /* insert value non-escaped */ case '$': /* insert value escaped */ if (*(s + 1) == '{') { @@ -302,16 +301,6 @@ writepage(FILE *fp, const char *filename, struct variable *c, char *s) value = v->value; switch (op) { - case '%': - if (value[0]) { - value = readfile(value); - fputs(value, fp); - free(value); - } - for (e = s; *e && *e != '}'; e++) - ; - s = e; - break; case '$': xmlencode(value, fp); break;