set "index" variable and check it strictly against "0" - saait - the most boring static page generator
 (HTM) git clone git://git.codemadness.org/saait
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit b100a92a2e2f256febcd2c87232ca368a8b6d80a
 (DIR) parent 8ce9999df8e020ddd9f00ad6ce4a0578254a9e31
 (HTM) 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:
         M saait.c                             |       3 ++-
       
       1 file changed, 2 insertions(+), 1 deletion(-)
       ---
 (DIR) 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",