diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/sord.c | 26 | ||||
-rw-r--r-- | src/sord_internal.h | 9 | ||||
-rw-r--r-- | src/sord_test.c | 7 | ||||
-rw-r--r-- | src/sord_validate.c | 18 | ||||
-rw-r--r-- | src/sordi.c | 14 | ||||
-rw-r--r-- | src/syntax.c | 11 |
6 files changed, 49 insertions, 36 deletions
@@ -14,21 +14,27 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -// C99 -#include <assert.h> -#include <errno.h> -#include <stdint.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include "sord_config.h" // IWYU pragma: keep +#include "sord_internal.h" + +#include "serd/serd.h" +#include "sord/sord.h" #define ZIX_INLINE +#include "zix/btree.c" +#include "zix/btree.h" +#include "zix/common.h" #include "zix/digest.c" #include "zix/hash.c" -#include "zix/btree.c" +#include "zix/hash.h" -#include "sord_config.h" -#include "sord_internal.h" +#include <assert.h> +#include <stdarg.h> +#include <stdbool.h> +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> #ifdef __GNUC__ # define SORD_LOG_FUNC(fmt, arg1) __attribute__((format(printf, fmt, arg1))) diff --git a/src/sord_internal.h b/src/sord_internal.h index ddfe9c6..872b1c1 100644 --- a/src/sord_internal.h +++ b/src/sord_internal.h @@ -17,15 +17,16 @@ #ifndef SORD_SORD_INTERNAL_H #define SORD_SORD_INTERNAL_H -#include <stddef.h> -#include <stdint.h> - +#include "serd/serd.h" #include "sord/sord.h" +#include <stddef.h> + #if defined(__GNUC__) && __GNUC__ > 4 # define SORD_UNREACHABLE() __builtin_unreachable() #else -# define SORD_UNREACHABLE() assert(false) +# include <assert.h> +# define SORD_UNREACHABLE() assert(0) #endif /** Resource node metadata */ diff --git a/src/sord_test.c b/src/sord_test.c index 3553d4c..828acf8 100644 --- a/src/sord_test.c +++ b/src/sord_test.c @@ -14,14 +14,17 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "serd/serd.h" +#include "sord/sord.h" + #include <inttypes.h> #include <stdarg.h> +#include <stdbool.h> +#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include "sord/sord.h" - #ifdef __GNUC__ # define SORD_LOG_FUNC(fmt, arg1) __attribute__((format(printf, fmt, arg1))) #else diff --git a/src/sord_validate.c b/src/sord_validate.c index 3defdec..193dc06 100644 --- a/src/sord_validate.c +++ b/src/sord_validate.c @@ -17,14 +17,6 @@ #define _BSD_SOURCE 1 // for realpath #define _DEFAULT_SOURCE 1 // for realpath -#include <assert.h> -#include <stdlib.h> -#include <string.h> - -#ifdef _WIN32 -# include <windows.h> -#endif - #include "serd/serd.h" #include "sord/sord.h" #include "sord_config.h" @@ -32,6 +24,16 @@ #ifdef HAVE_PCRE # include <pcre.h> #endif +#ifdef _WIN32 +# include <windows.h> +#endif + +#include <stdarg.h> +#include <stdbool.h> +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> #ifdef __GNUC__ # define SORD_LOG_FUNC(fmt, arg1) __attribute__((format(printf, fmt, arg1))) diff --git a/src/sordi.c b/src/sordi.c index 49d761b..cb28390 100644 --- a/src/sordi.c +++ b/src/sordi.c @@ -14,17 +14,19 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <assert.h> -#include <stdlib.h> -#include <string.h> +#include "serd/serd.h" +#include "sord/sord.h" +#include "sord_config.h" #ifdef _WIN32 # include <windows.h> #endif -#include "serd/serd.h" -#include "sord/sord.h" -#include "sord_config.h" +#include <stdbool.h> +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> #define SORDI_ERROR(msg) fprintf(stderr, "sordi: " msg); #define SORDI_ERRORF(fmt, ...) fprintf(stderr, "sordi: " fmt, __VA_ARGS__); diff --git a/src/syntax.c b/src/syntax.c index 10b25f9..1561c1d 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -14,14 +14,13 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <assert.h> -#include <stdlib.h> -#include <string.h> - #include "serd/serd.h" +#include "sord/sord.h" -#include "sord_config.h" -#include "sord_internal.h" +#include <stdbool.h> +#include <stdint.h> +#include <stdlib.h> +#include <string.h> struct SordInserterImpl { SordModel* model; |