diff options
author | sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> | 2020-08-26 23:14:56 +0200 |
---|---|---|
committer | sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> | 2020-08-26 23:14:56 +0200 |
commit | f4b7cf4448effa168f2e1c247353c00e2741e831 (patch) | |
tree | 6a9f6405e7669705bc1a6fa1dfb36a362f795b61 | |
parent | bffb40f1516067d4eee1e072a34702f24c30fd47 (diff) |
refactor(treewide): prefix public/internal API with sternenblog/
-rw-r--r-- | Doxyfile | 1 | ||||
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | main.c | 17 | ||||
-rw-r--r-- | sternenblog/cgiutil.c (renamed from cgiutil.c) | 0 | ||||
-rw-r--r-- | sternenblog/cgiutil.h (renamed from cgiutil.h) | 0 | ||||
-rw-r--r-- | sternenblog/core.h (renamed from core.h) | 0 | ||||
-rw-r--r-- | sternenblog/entry.c (renamed from entry.c) | 2 | ||||
-rw-r--r-- | sternenblog/entry.h (renamed from entry.h) | 0 | ||||
-rw-r--r-- | sternenblog/index.c (renamed from index.c) | 0 | ||||
-rw-r--r-- | sternenblog/index.h (renamed from index.h) | 0 | ||||
-rw-r--r-- | sternenblog/stringutil.c (renamed from stringutil.c) | 0 | ||||
-rw-r--r-- | sternenblog/stringutil.h (renamed from stringutil.h) | 0 | ||||
-rw-r--r-- | sternenblog/template.h (renamed from template.h) | 0 | ||||
-rw-r--r-- | sternenblog/timeutil.c (renamed from timeutil.c) | 0 | ||||
-rw-r--r-- | sternenblog/timeutil.h (renamed from timeutil.h) | 0 | ||||
-rw-r--r-- | sternenblog/xml.c (renamed from xml.c) | 0 | ||||
-rw-r--r-- | sternenblog/xml.h (renamed from xml.h) | 0 | ||||
-rw-r--r-- | templates/simple.c | 13 |
18 files changed, 24 insertions, 19 deletions
diff --git a/Doxyfile b/Doxyfile index 73a2d68..8163fc2 100644 --- a/Doxyfile +++ b/Doxyfile @@ -26,3 +26,4 @@ EXAMPLE_PATH = ./doc/examples/ # hack to allow @include simple.c EXAMPLE_PATH += ./templates/ EXCLUDE_SYMBOLS = _POSIX_C_SOURCE +RECURSIVE = YES diff --git a/Makefile b/Makefile index 97529d6..0b4f5f8 100644 --- a/Makefile +++ b/Makefile @@ -2,22 +2,24 @@ include config.mk ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) +TEMPLATE_API = sternenblog/core.h config.h sternenblog/xml.h sternenblog/cgiutil.h sternenblog/timeutil.h sternenblog/stringutil.h + sternenblog.cgi: xml.o entry.o index.o stringutil.o cgiutil.o timeutil.o $(TEMPLATE).o main.o $(CC) $(CFLAGS) -o $@ $^ -main.o: main.c core.h timeutil.h config.h +main.o: main.c sternenblog/core.h config.h $(CC) $(CFLAGS) -c -o main.o $< -$(TEMPLATE).o: $(TEMPLATE).c core.h config.h xml.h cgiutil.h timeutil.h stringutil.h +$(TEMPLATE).o: $(TEMPLATE).c $(TEMPLATE_API) $(CC) $(CFLAGS) -I$(ROOT_DIR) -c -o $@ $< -entry.o: config.h entry.c +entry.o: config.h sternenblog/entry.c sternenblog/entry.h # only invoked if config.h does not exist config.h: $(CP) config.example.h config.h -%.o: %.c %.h +%.o: sternenblog/%.c sternenblog/%.h $(CC) $(CFLAGS) -c -o $@ $< clean: diff --git a/main.c b/main.c index dfbfd5f..e6689d5 100644 --- a/main.c +++ b/main.c @@ -86,15 +86,16 @@ #include <time.h> #include <unistd.h> -#include "core.h" #include "config.h" -#include "cgiutil.h" -#include "entry.h" -#include "index.h" -#include "stringutil.h" -#include "timeutil.h" -#include "template.h" -#include "xml.h" + +#include "sternenblog/core.h" +#include "sternenblog/cgiutil.h" +#include "sternenblog/entry.h" +#include "sternenblog/index.h" +#include "sternenblog/stringutil.h" +#include "sternenblog/timeutil.h" +#include "sternenblog/template.h" +#include "sternenblog/xml.h" /*! * @brief Routing enum to differentiate feeds diff --git a/cgiutil.c b/sternenblog/cgiutil.c index 7dc8114..7dc8114 100644 --- a/cgiutil.c +++ b/sternenblog/cgiutil.c diff --git a/cgiutil.h b/sternenblog/cgiutil.h index f809b25..f809b25 100644 --- a/cgiutil.h +++ b/sternenblog/cgiutil.h diff --git a/core.h b/sternenblog/core.h index d380d24..d380d24 100644 --- a/core.h +++ b/sternenblog/core.h diff --git a/entry.c b/sternenblog/entry.c index 8bb6476..0318311 100644 --- a/entry.c +++ b/sternenblog/entry.c @@ -11,7 +11,7 @@ #include <unistd.h> #include "core.h" -#include "config.h" // TODO: make independent? +#include "../config.h" // TODO: make independent? #include "cgiutil.h" #include "entry.h" diff --git a/entry.h b/sternenblog/entry.h index de8d868..de8d868 100644 --- a/entry.h +++ b/sternenblog/entry.h diff --git a/index.c b/sternenblog/index.c index bb94bb9..bb94bb9 100644 --- a/index.c +++ b/sternenblog/index.c diff --git a/index.h b/sternenblog/index.h index 586d203..586d203 100644 --- a/index.h +++ b/sternenblog/index.h diff --git a/stringutil.c b/sternenblog/stringutil.c index 44cec9e..44cec9e 100644 --- a/stringutil.c +++ b/sternenblog/stringutil.c diff --git a/stringutil.h b/sternenblog/stringutil.h index c7cb40d..c7cb40d 100644 --- a/stringutil.h +++ b/sternenblog/stringutil.h diff --git a/template.h b/sternenblog/template.h index 24b9504..24b9504 100644 --- a/template.h +++ b/sternenblog/template.h diff --git a/timeutil.c b/sternenblog/timeutil.c index 187ace0..187ace0 100644 --- a/timeutil.c +++ b/sternenblog/timeutil.c diff --git a/timeutil.h b/sternenblog/timeutil.h index 7d0270e..7d0270e 100644 --- a/timeutil.h +++ b/sternenblog/timeutil.h diff --git a/xml.c b/sternenblog/xml.c index 5965a09..5965a09 100644 --- a/xml.c +++ b/sternenblog/xml.c diff --git a/xml.h b/sternenblog/xml.h index 869a579..869a579 100644 --- a/xml.h +++ b/sternenblog/xml.h diff --git a/templates/simple.c b/templates/simple.c index 9c9f20f..1b3c293 100644 --- a/templates/simple.c +++ b/templates/simple.c @@ -3,13 +3,14 @@ #include <stdlib.h> #include <string.h> -#include <core.h> -#include <template.h> #include <config.h> -#include <cgiutil.h> -#include <stringutil.h> -#include <timeutil.h> -#include <xml.h> + +#include <sternenblog/core.h> +#include <sternenblog/template.h> +#include <sternenblog/cgiutil.h> +#include <sternenblog/stringutil.h> +#include <sternenblog/timeutil.h> +#include <sternenblog/xml.h> static struct xml_context ctx; |