saait

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

commit 2d2e29f01cc83bf0adf67cca4df8dff8cec2a7d0
parent 006c966d13aaf775f31e2c344e4243402d1f5f56
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat, 22 Sep 2018 12:55:54 +0200

minor code-style: order op chars

Diffstat:
Msaait.c | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/saait.c b/saait.c @@ -302,9 +302,9 @@ writepage(FILE *fp, const char *file, 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 */ + case '%': /* insert contents of filename set in variable */ if (*(s + 1) == '{') { s += 2; break; @@ -343,6 +343,12 @@ writepage(FILE *fp, const char *file, struct variable *c, char *s) } switch (op) { + case '#': + fputs(v->value, fp); + break; + case '$': + xmlencode(v->value, fp); + break; case '%': if (!v->value[0]) break; @@ -350,12 +356,6 @@ writepage(FILE *fp, const char *file, struct variable *c, char *s) catfile(fpin, v->value, fp, file); fclose(fpin); break; - case '$': - xmlencode(v->value, fp); - break; - case '#': - fputs(v->value, fp); - break; } } }