saait

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

commit b100a92a2e2f256febcd2c87232ca368a8b6d80a
parent 8ce9999df8e020ddd9f00ad6ce4a0578254a9e31
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sun,  5 Jan 2020 14:08:58 +0100

set "index" variable and check it strictly against "0"

Diffstat:
Msaait.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/saait.c b/saait.c @@ -496,8 +496,9 @@ main(int argc, char *argv[]) for (i = 0; i < (size_t)argc; i++) { c = readconfig(argv[i]); + setvar(&c, newvar("index", "1"), 0); v = getvar(c, "index"); - doindex = !(v && v->value[0] == '0'); + doindex = (!v || strcmp(v->value, "0")); if ((p = strrchr(argv[i], '.'))) r = snprintf(htmlfile, sizeof(htmlfile), "%.*s.html",