diff options
author | David Robillard <d@drobilla.net> | 2019-01-06 17:04:21 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-01-06 17:04:21 +0100 |
commit | 5807e4a873730fdb245b3c39913fc6acb3779f8a (patch) | |
tree | 0dd771ec001522848c37709a15af8692f9713208 /zix | |
parent | ef51139dfb60850c9ee4f6d9ea4ea7bfbc4aa15a (diff) | |
download | zix-5807e4a873730fdb245b3c39913fc6acb3779f8a.tar.gz zix-5807e4a873730fdb245b3c39913fc6acb3779f8a.tar.bz2 zix-5807e4a873730fdb245b3c39913fc6acb3779f8a.zip |
Clean up includes
Diffstat (limited to 'zix')
-rw-r--r-- | zix/ampatree.c | 12 | ||||
-rw-r--r-- | zix/ampatree.h | 2 | ||||
-rw-r--r-- | zix/bitset.c | 6 | ||||
-rw-r--r-- | zix/bitset.h | 5 | ||||
-rw-r--r-- | zix/btree.c | 5 | ||||
-rw-r--r-- | zix/btree.h | 7 | ||||
-rw-r--r-- | zix/chunk.c | 5 | ||||
-rw-r--r-- | zix/chunk.h | 5 | ||||
-rw-r--r-- | zix/digest.h | 4 | ||||
-rw-r--r-- | zix/hash.c | 5 | ||||
-rw-r--r-- | zix/hash.h | 4 | ||||
-rw-r--r-- | zix/patree.c | 10 | ||||
-rw-r--r-- | zix/patree.h | 2 | ||||
-rw-r--r-- | zix/ring.c | 5 | ||||
-rw-r--r-- | zix/ring.h | 2 | ||||
-rw-r--r-- | zix/sem.h | 6 | ||||
-rw-r--r-- | zix/sorted_array.c | 8 | ||||
-rw-r--r-- | zix/sorted_array.h | 3 | ||||
-rw-r--r-- | zix/strindex.c | 7 | ||||
-rw-r--r-- | zix/thread.h | 8 | ||||
-rw-r--r-- | zix/tree.c | 8 | ||||
-rw-r--r-- | zix/tree.h | 5 | ||||
-rw-r--r-- | zix/trie.c | 10 | ||||
-rw-r--r-- | zix/trie.h | 2 | ||||
-rw-r--r-- | zix/trie_util.h | 3 |
25 files changed, 78 insertions, 61 deletions
diff --git a/zix/ampatree.c b/zix/ampatree.c index 3c62e04..f0a45a3 100644 --- a/zix/ampatree.c +++ b/zix/ampatree.c @@ -16,17 +16,19 @@ #define _XOPEN_SOURCE 500 +#include "zix/ampatree.h" + +#include "zix/bitset.h" +#include "zix/common.h" +#include "zix/trie_util.h" + #include <assert.h> +#include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include "zix/ampatree.h" -#include "zix/bitset.h" -#include "zix/common.h" -#include "zix/trie_util.h" - #define ZIX_AMPATREE_BITS 256 #define ZIX_AMPATREE_ELEMS (ZIX_BITSET_ELEMS(ZIX_AMPATREE_BITS)) diff --git a/zix/ampatree.h b/zix/ampatree.h index 33e8acf..c7f7eb7 100644 --- a/zix/ampatree.h +++ b/zix/ampatree.h @@ -19,6 +19,8 @@ #include "zix/common.h" +#include <stdio.h> + /** @addtogroup zix @{ diff --git a/zix/bitset.c b/zix/bitset.c index 155fc82..dbb3d63 100644 --- a/zix/bitset.c +++ b/zix/bitset.c @@ -14,12 +14,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <string.h> - -#include <stdio.h> - #include "zix/bitset.h" +#include <string.h> + /** Number of bits per ZixBitset element (ala CHAR_BIT). */ #define ZIX_BITSET_ELEM_BIT (CHAR_BIT * sizeof(ZixBitset)) diff --git a/zix/bitset.h b/zix/bitset.h index 31be3c5..0e31063 100644 --- a/zix/bitset.h +++ b/zix/bitset.h @@ -17,12 +17,13 @@ #ifndef ZIX_BITSET_H #define ZIX_BITSET_H +#include "zix/common.h" + #include <limits.h> +#include <stdbool.h> #include <stddef.h> #include <stdint.h> -#include "zix/common.h" - /** @addtogroup zix @{ diff --git a/zix/btree.c b/zix/btree.c index f337f7d..75ce363 100644 --- a/zix/btree.c +++ b/zix/btree.c @@ -14,14 +14,13 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "zix/btree.h" + #include <assert.h> #include <stdint.h> -#include <stdio.h> #include <stdlib.h> #include <string.h> -#include "zix/btree.h" - // #define ZIX_BTREE_DEBUG 1 #ifndef ZIX_BTREE_PAGE_SIZE diff --git a/zix/btree.h b/zix/btree.h index 46daa24..6aca9bf 100644 --- a/zix/btree.h +++ b/zix/btree.h @@ -17,14 +17,13 @@ #ifndef ZIX_BTREE_H #define ZIX_BTREE_H -#include <stddef.h> - #include "zix/common.h" +#include <stdbool.h> +#include <stddef.h> + #ifdef __cplusplus extern "C" { -#else -# include <stdbool.h> #endif /** diff --git a/zix/chunk.c b/zix/chunk.c index 4533b26..d1e7e6c 100644 --- a/zix/chunk.c +++ b/zix/chunk.c @@ -14,11 +14,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <string.h> - #include "zix/chunk.h" + #include "zix/digest.h" +#include <string.h> + ZIX_API uint32_t zix_chunk_hash(const ZixChunk* const chunk) { diff --git a/zix/chunk.h b/zix/chunk.h index 6efa766..162df41 100644 --- a/zix/chunk.h +++ b/zix/chunk.h @@ -17,11 +17,12 @@ #ifndef ZIX_CHUNK_H #define ZIX_CHUNK_H +#include "zix/common.h" + +#include <stdbool.h> #include <stddef.h> #include <stdint.h> -#include "zix/common.h" - #ifdef __cplusplus extern "C" { #endif diff --git a/zix/digest.h b/zix/digest.h index 8c96492..264c918 100644 --- a/zix/digest.h +++ b/zix/digest.h @@ -17,11 +17,11 @@ #ifndef ZIX_DIGEST_H #define ZIX_DIGEST_H +#include "zix/common.h" + #include <stddef.h> #include <stdint.h> -#include "zix/common.h" - #ifdef __cplusplus extern "C" { #endif @@ -14,13 +14,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "zix/hash.h" + #include <assert.h> -#include <stdint.h> #include <stdlib.h> #include <string.h> -#include "zix/hash.h" - /** Primes, each slightly less than twice its predecessor, and as far away from powers of two as possible. @@ -17,11 +17,11 @@ #ifndef ZIX_HASH_H #define ZIX_HASH_H +#include "zix/common.h" + #include <stddef.h> #include <stdint.h> -#include "zix/common.h" - #ifdef __cplusplus extern "C" { #endif diff --git a/zix/patree.c b/zix/patree.c index efb52b5..fe552d8 100644 --- a/zix/patree.c +++ b/zix/patree.c @@ -16,7 +16,13 @@ #define _XOPEN_SOURCE 500 +#include "zix/patree.h" + +#include "zix/common.h" +#include "zix/trie_util.h" + #include <assert.h> +#include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> @@ -24,10 +30,6 @@ // #define ZIX_TRIE_LINEAR_SEARCH 1 -#include "zix/common.h" -#include "zix/patree.h" -#include "zix/trie_util.h" - typedef size_t n_edges_t; typedef struct { diff --git a/zix/patree.h b/zix/patree.h index 35436c8..406fbf0 100644 --- a/zix/patree.h +++ b/zix/patree.h @@ -19,6 +19,8 @@ #include "zix/common.h" +#include <stdio.h> + /** @addtogroup zix @{ @@ -14,7 +14,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <stdint.h> +#include "zix/ring.h" + #include <stdlib.h> #include <string.h> @@ -46,8 +47,6 @@ #define ZIX_READ_BARRIER() ZIX_FULL_BARRIER() #define ZIX_WRITE_BARRIER() ZIX_FULL_BARRIER() -#include "zix/ring.h" - struct ZixRingImpl { uint32_t write_head; ///< Read index into buf uint32_t read_head; ///< Write index into buf @@ -19,8 +19,6 @@ #include <stdint.h> -#include "zix/common.h" - #ifdef __cplusplus extern "C" { #endif @@ -17,6 +17,10 @@ #ifndef ZIX_SEM_H #define ZIX_SEM_H +#include "zix/common.h" + +#include <stdbool.h> + #ifdef __APPLE__ # include <mach/mach.h> #elif defined(_WIN32) @@ -27,8 +31,6 @@ # include <errno.h> #endif -#include "zix/common.h" - #ifdef __cplusplus extern "C" { #endif diff --git a/zix/sorted_array.c b/zix/sorted_array.c index f8e785d..8929d35 100644 --- a/zix/sorted_array.c +++ b/zix/sorted_array.c @@ -14,15 +14,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "zix/sorted_array.h" + +#include "zix/common.h" + #include <assert.h> #include <stdint.h> -#include <stdio.h> #include <stdlib.h> #include <string.h> -#include "zix/common.h" -#include "zix/sorted_array.h" - // #define ZIX_SORTED_ARRAY_DUMP 1 struct ZixSortedArrayImpl { diff --git a/zix/sorted_array.h b/zix/sorted_array.h index c10c2b6..3e94ca5 100644 --- a/zix/sorted_array.h +++ b/zix/sorted_array.h @@ -19,6 +19,9 @@ #include "zix/common.h" +#include <stdbool.h> +#include <stddef.h> + #ifdef __cplusplus extern "C" { #endif diff --git a/zix/strindex.c b/zix/strindex.c index f98b1b0..a502177 100644 --- a/zix/strindex.c +++ b/zix/strindex.c @@ -16,14 +16,15 @@ #define _XOPEN_SOURCE 500 +#include "zix/strindex.h" + +#include "zix/common.h" + #include <assert.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include "zix/common.h" -#include "zix/strindex.h" - typedef struct _ZixStrindexNode { struct _ZixStrindexNode* children; /* Children of this node */ size_t num_children; /* Number of outgoing edges */ diff --git a/zix/thread.h b/zix/thread.h index b007efa..9f05b10 100644 --- a/zix/thread.h +++ b/zix/thread.h @@ -17,6 +17,10 @@ #ifndef ZIX_THREAD_H #define ZIX_THREAD_H +#include "zix/common.h" + +#include <stdbool.h> + #ifdef _WIN32 # include <windows.h> #else @@ -24,12 +28,8 @@ # include <pthread.h> #endif -#include "zix/common.h" - #ifdef __cplusplus extern "C" { -#else -# include <stdbool.h> #endif /** @@ -14,15 +14,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "zix/tree.h" + +#include "zix/common.h" + #include <assert.h> #include <stdint.h> -#include <stdio.h> #include <stdlib.h> #include <string.h> -#include "zix/common.h" -#include "zix/tree.h" - typedef struct ZixTreeNodeImpl ZixTreeNode; struct ZixTreeImpl { @@ -17,10 +17,11 @@ #ifndef ZIX_TREE_H #define ZIX_TREE_H -#include <stddef.h> - #include "zix/common.h" +#include <stdbool.h> +#include <stddef.h> + #ifdef __cplusplus extern "C" { #endif @@ -16,7 +16,13 @@ #define _XOPEN_SOURCE 500 +#include "zix/trie.h" + +#include "zix/common.h" +#include "zix/trie_util.h" + #include <assert.h> +#include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> @@ -24,10 +30,6 @@ // #define ZIX_TRIE_LINEAR_SEARCH 1 -#include "zix/common.h" -#include "zix/trie.h" -#include "zix/trie_util.h" - //typedef uint_fast8_t n_edges_t; typedef uintptr_t n_edges_t; @@ -19,6 +19,8 @@ #include "zix/common.h" +#include <stdio.h> + /** @addtogroup zix @{ diff --git a/zix/trie_util.h b/zix/trie_util.h index 45cc1f1..e21d9d6 100644 --- a/zix/trie_util.h +++ b/zix/trie_util.h @@ -17,6 +17,9 @@ #ifndef ZIX_TRIE_UTIL_H #define ZIX_TRIE_UTIL_H +#include <assert.h> +#include <stdint.h> + #ifdef __SSE4_2__ # include <smmintrin.h> #endif |