neocities.h

a C library for interacting with Neocities' API
git clone https://github.com/tanguyandreani/neocities.h
Log | Files | Refs | README | LICENSE

commit 748298af0c8b5698a093bf9ba366242b713f8cce
parent bc08063b90e3b66f6afcc1a6f976d41659597cbe
Author: Tanguy Andreani <dev@tanguy.space>
Date:   Thu, 21 Feb 2019 21:52:28 +0100

Added: Makefile

Diffstat:
M.gitignore | 5+++--
AMakefile | 12++++++++++++
Mneocities.h | 2++
3 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1,2 +1,3 @@ apikey.h -a.out- \ No newline at end of file +a.out +example+ \ No newline at end of file diff --git a/Makefile b/Makefile @@ -0,0 +1,11 @@ +CC=gcc # clang +FLAGS=-lcurl -ljson-c -I/usr/include/json-c +DEBUG=-DNEOCITIES_DEBUG + +all: example + +example: example.c + $(CC) -o $(<:.c=) $< $(FLAGS) $(DEBUG) + +clean: + rm -f ./example+ \ No newline at end of file diff --git a/neocities.h b/neocities.h @@ -223,7 +223,9 @@ enum neocities_error neocities_api(const char *apikey, const char *action, *obj = json_tokener_parse_ex(tok, (char *) neocities.buf, neocities.pos); +#ifdef NEOCITIES_DEBUG neocities_dump(&neocities); +#endif neocities_destroy(&neocities); if (*obj == NULL)