diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/blogc-git-receiver.c | 7 | ||||
-rw-r--r-- | src/blogc-runserver.c | 6 | ||||
-rw-r--r-- | src/blogc.c | 9 | ||||
-rw-r--r-- | src/content-parser.c | 5 | ||||
-rw-r--r-- | src/content-parser.h | 2 | ||||
-rw-r--r-- | src/debug.c | 5 | ||||
-rw-r--r-- | src/error.c | 5 | ||||
-rw-r--r-- | src/error.h | 3 | ||||
-rw-r--r-- | src/file.c | 6 | ||||
-rw-r--r-- | src/file.h | 2 | ||||
-rw-r--r-- | src/loader.c | 6 | ||||
-rw-r--r-- | src/renderer.c | 8 | ||||
-rw-r--r-- | src/source-parser.c | 6 | ||||
-rw-r--r-- | src/source-parser.h | 2 | ||||
-rw-r--r-- | src/template-parser.c | 5 | ||||
-rw-r--r-- | src/template-parser.h | 1 | ||||
-rw-r--r-- | src/utf8.c | 3 | ||||
-rw-r--r-- | src/utf8.h | 3 | ||||
-rw-r--r-- | src/utils.c | 6 | ||||
-rw-r--r-- | src/utils.h | 2 |
20 files changed, 25 insertions, 67 deletions
diff --git a/src/blogc-git-receiver.c b/src/blogc-git-receiver.c index e717259..820fce5 100644 --- a/src/blogc-git-receiver.c +++ b/src/blogc-git-receiver.c @@ -6,12 +6,8 @@ * See the file LICENSE. */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif /* HAVE_CONFIG_H */ - -#include <stdarg.h> #include <stdbool.h> +#include <stddef.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -19,7 +15,6 @@ #include <unistd.h> #include <errno.h> #include <sys/stat.h> -#include <sys/types.h> #include <dirent.h> #include <time.h> diff --git a/src/blogc-runserver.c b/src/blogc-runserver.c index 81bd5f9..603946d 100644 --- a/src/blogc-runserver.c +++ b/src/blogc-runserver.c @@ -13,21 +13,21 @@ #include <event2/event.h> #include <event2/http.h> #include <event2/buffer.h> -#include <event2/keyvalq_struct.h> #include <magic.h> #include <signal.h> -#include <stdarg.h> #include <stdbool.h> +#include <stddef.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include "utils.h" +struct evhttp_request; + /** * this mapping is used to declare "supported" file types, that are forced over diff --git a/src/blogc.c b/src/blogc.c index 20e1756..c90070d 100644 --- a/src/blogc.c +++ b/src/blogc.c @@ -14,18 +14,15 @@ #include <sys/stat.h> #endif /* HAVE_SYS_STAT_H */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif /* HAVE_SYS_TYPES_H */ - #include <errno.h> #include <locale.h> #include <stdbool.h> #include <stdio.h> +#include <stdint.h> +#include <stdlib.h> #include <string.h> #include "debug.h" -#include "source-parser.h" #include "template-parser.h" #include "loader.h" #include "renderer.h" @@ -78,7 +75,7 @@ blogc_mkdir_recursive(const char *filename) for (char *tmp = fname; *tmp != '\0'; tmp++) { if (*tmp != '/' && *tmp != '\\') continue; -#if defined(HAVE_SYS_STAT_H) && defined(HAVE_SYS_TYPES_H) +#ifdef HAVE_SYS_STAT_H char bkp = *tmp; *tmp = '\0'; if ((strlen(fname) > 0) && diff --git a/src/content-parser.c b/src/content-parser.c index b4bc790..ca0597b 100644 --- a/src/content-parser.c +++ b/src/content-parser.c @@ -6,11 +6,8 @@ * See the file LICENSE. */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif /* HAVE_CONFIG_H */ - #include <stdbool.h> +#include <stdlib.h> #include <string.h> #include "content-parser.h" diff --git a/src/content-parser.h b/src/content-parser.h index 85bd063..37e38d7 100644 --- a/src/content-parser.h +++ b/src/content-parser.h @@ -9,7 +9,7 @@ #ifndef _CONTENT_PARSER_H #define _CONTENT_PARSER_H -#include <stdlib.h> +#include <stddef.h> #include <stdbool.h> char* blogc_slugify(const char *str); diff --git a/src/debug.c b/src/debug.c index 7039608..9689028 100644 --- a/src/debug.c +++ b/src/debug.c @@ -6,15 +6,10 @@ * See the file LICENSE. */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif /* HAVE_CONFIG_H */ - #include <stdio.h> #include "template-parser.h" #include "utils.h" - #include "debug.h" diff --git a/src/error.c b/src/error.c index 0c297b9..c238f51 100644 --- a/src/error.c +++ b/src/error.c @@ -6,14 +6,9 @@ * See the file LICENSE. */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif /* HAVE_CONFIG_H */ - #include <stdio.h> #include <stdlib.h> #include <stdarg.h> -#include <string.h> #include "error.h" #include "utils.h" diff --git a/src/error.h b/src/error.h index acaf49e..31fbaf2 100644 --- a/src/error.h +++ b/src/error.h @@ -9,8 +9,7 @@ #ifndef _ERROR_H #define _ERROR_H -#include <stdlib.h> -#include <stdarg.h> +#include <stddef.h> typedef enum { BLOGC_ERROR_SOURCE_PARSER = 1, @@ -6,12 +6,10 @@ * See the file LICENSE. */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif /* HAVE_CONFIG_H */ - #include <errno.h> #include <stdarg.h> +#include <stdbool.h> +#include <stdint.h> #include <stdio.h> #include <string.h> #include "file.h" @@ -9,8 +9,8 @@ #ifndef _FILE_H #define _FILE_H +#include <stddef.h> #include <stdio.h> -#include <stdlib.h> #include "error.h" #define BLOGC_FILE_CHUNK_SIZE 1024 diff --git a/src/loader.c b/src/loader.c index 5ca0aac..bd3251e 100644 --- a/src/loader.c +++ b/src/loader.c @@ -6,13 +6,11 @@ * See the file LICENSE. */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif /* HAVE_CONFIG_H */ - #include <math.h> #include <stdbool.h> +#include <stddef.h> #include <stdio.h> +#include <stdlib.h> #include <string.h> #include "file.h" #include "source-parser.h" diff --git a/src/renderer.c b/src/renderer.c index c9cc15b..27e92bd 100644 --- a/src/renderer.c +++ b/src/renderer.c @@ -6,18 +6,14 @@ * See the file LICENSE. */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif /* HAVE_CONFIG_H */ - #include <errno.h> #include <stdbool.h> +#include <stddef.h> #include <stdio.h> +#include <stdlib.h> #include <string.h> #include "datetime-parser.h" #include "error.h" -#include "loader.h" -#include "source-parser.h" #include "template-parser.h" #include "renderer.h" #include "utils.h" diff --git a/src/source-parser.c b/src/source-parser.c index f250bd3..5d29213 100644 --- a/src/source-parser.c +++ b/src/source-parser.c @@ -6,11 +6,7 @@ * See the file LICENSE. */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif /* HAVE_CONFIG_H */ - -#include <stdbool.h> +#include <stdlib.h> #include <string.h> #include "content-parser.h" diff --git a/src/source-parser.h b/src/source-parser.h index 5cadf95..0d54742 100644 --- a/src/source-parser.h +++ b/src/source-parser.h @@ -9,7 +9,7 @@ #ifndef _SOURCE_PARSER_H #define _SOURCE_PARSER_H -#include <stdlib.h> +#include <stddef.h> #include "error.h" #include "utils.h" diff --git a/src/template-parser.c b/src/template-parser.c index 7e9a444..6ca6eb7 100644 --- a/src/template-parser.c +++ b/src/template-parser.c @@ -6,11 +6,8 @@ * See the file LICENSE. */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif /* HAVE_CONFIG_H */ - #include <stdbool.h> +#include <stdlib.h> #include <string.h> #include "template-parser.h" diff --git a/src/template-parser.h b/src/template-parser.h index fe2721e..19df6af 100644 --- a/src/template-parser.h +++ b/src/template-parser.h @@ -9,6 +9,7 @@ #ifndef _TEMPLATE_PARSER_H #define _TEMPLATE_PARSER_H +#include <stddef.h> #include "error.h" #include "utils.h" @@ -26,7 +26,8 @@ // See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details. #include <stdbool.h> -#include <inttypes.h> +#include <stddef.h> +#include <stdint.h> #include "utils.h" #define UTF8_ACCEPT 0 @@ -9,8 +9,9 @@ #ifndef _UTF_8_H #define _UTF_8_H -#include <inttypes.h> #include <stdbool.h> +#include <stddef.h> +#include <stdint.h> #include "utils.h" bool blogc_utf8_validate(const uint8_t *str, size_t len); diff --git a/src/utils.c b/src/utils.c index 9a39c61..b42ae4e 100644 --- a/src/utils.c +++ b/src/utils.c @@ -6,17 +6,11 @@ * See the file LICENSE. */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif /* HAVE_CONFIG_H */ - #define SB_STRING_CHUNK_SIZE 128 -#include <ctype.h> #include <string.h> #include <stdarg.h> #include <stdbool.h> -#include <stdio.h> #include <stdlib.h> #include <stdio.h> diff --git a/src/utils.h b/src/utils.h index aefcbf3..aca02c0 100644 --- a/src/utils.h +++ b/src/utils.h @@ -12,8 +12,6 @@ #include <stddef.h> #include <stdarg.h> #include <stdbool.h> -#include <stdarg.h> -#include <stdlib.h> // memory |