saait

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

commit ec3792b0ae793662a3eb71a9ae50dad76a54b8c3
parent 837925780d886c082cfe0b24c41af01c5ef91e66
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat, 26 Nov 2016 19:06:20 +0100

cleanup

Diffstat:
MMakefile | 2+-
Mconfig.h | 1-
Msaait.c | 9---------
3 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/Makefile b/Makefile @@ -3,7 +3,7 @@ test: build ./saait `ls -1r pages/*.cfg` build: clean - cc -ggdb saait.c -o saait -Wall -std=c99 + cc -ggdb saait.c -o saait -Wall -std=c99 -Wextra -pedantic clean: rm -f saait diff --git a/config.h b/config.h @@ -1,7 +1,6 @@ static const char *configfile = "config.cfg"; static const char *outputdir = "output"; static const char *templatedir = "templates"; -static const char *pagesdir = "pages"; enum { BlockHeader = 0, BlockItem, BlockFooter, BlockLast }; diff --git a/saait.c b/saait.c @@ -1,6 +1,3 @@ -#include <sys/stat.h> -#include <sys/types.h> - #include <ctype.h> #include <errno.h> #include <limits.h> @@ -275,7 +272,6 @@ writepage(FILE *fp, const char *filename, struct config *c, char *s) int op; for (; *s; s++) { - /* TODO: error if unterminated */ op = *s; switch (*s) { case '%': /* insert contents of filename set in variable */ @@ -327,7 +323,6 @@ writepage(FILE *fp, const char *filename, struct config *c, char *s) } value = v->value; - /* TODO: optimize output directly (buffered) */ if (op == '%') { value = readfile(value); fputs(value, fp); @@ -370,10 +365,6 @@ main(int argc, char *argv[]) case 'c': configfile = EARGF(usage()); break; - case 'd': - case 'p': - pagesdir = EARGF(usage()); - break; case 'o': outputdir = EARGF(usage()); break;