Introduction
Introduction Statistics Contact Development Disclaimer Help
minor code-style: order op chars - saait - the most boring static page generator
git clone git://git.codemadness.org/saait
Log
Files
Refs
README
LICENSE
---
commit 2d2e29f01cc83bf0adf67cca4df8dff8cec2a7d0
parent 006c966d13aaf775f31e2c344e4243402d1f5f56
Author: Hiltjo Posthuma <[email protected]>
Date: Sat, 22 Sep 2018 12:55:54 +0200
minor code-style: order op chars
Diffstat:
M saait.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, c…
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, …
}
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, …
catfile(fpin, v->value, fp, file);
fclose(fpin);
break;
- case '$':
- xmlencode(v->value, fp);
- break;
- case '#':
- fputs(v->value, fp);
- break;
}
}
}
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.