From: Mike D. Lowis Date: Wed, 30 Sep 2015 12:32:21 +0000 (-0400) Subject: Ensure that all provided data structures are standalone and do not require the rest... X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=62b920cab6b7b36daa1a5a3f8060fe566639fa09;p=archive%2Fcarl.git Ensure that all provided data structures are standalone and do not require the rest of the lib to function --- diff --git a/.gitignore b/.gitignore index be55fce..a39158e 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,6 @@ .rsconscache test_libc test_libc.exe +*.d +.ninja_deps +.ninja_log diff --git a/source/data/bstree.c b/source/data/bstree.c index 2ba4eeb..882cd91 100644 --- a/source/data/bstree.c +++ b/source/data/bstree.c @@ -1,5 +1,7 @@ #include + + void bstree_init(bstree_t* tree, bstree_cmpfn_t cmpfn, bool allow_dups) { tree->root = NULL; diff --git a/source/data/bstree.h b/source/data/bstree.h index 0c029ce..c8cbd88 100644 --- a/source/data/bstree.h +++ b/source/data/bstree.h @@ -4,7 +4,8 @@ #ifndef BSTREE_H #define BSTREE_H -#include +#include +#include typedef struct bstree_node_t { struct bstree_node_t* left; diff --git a/source/data/list.h b/source/data/list.h index 6615891..544be63 100644 --- a/source/data/list.h +++ b/source/data/list.h @@ -4,7 +4,8 @@ #ifndef LIST_H #define LIST_H -#include +#include +#include typedef struct list_node_t { struct list_node_t* next; diff --git a/source/data/slist.h b/source/data/slist.h index 19cbfd3..b441e56 100644 --- a/source/data/slist.h +++ b/source/data/slist.h @@ -4,7 +4,8 @@ #ifndef SLIST_H #define SLIST_H -#include +#include +#include typedef struct slist_node_t { struct slist_node_t* next; diff --git a/source/data/vec.c b/source/data/vec.c index 1f27352..23374f7 100644 --- a/source/data/vec.c +++ b/source/data/vec.c @@ -2,6 +2,8 @@ @file vec.c */ #include +#include +#include #ifndef DEFAULT_VEC_CAPACITY #define DEFAULT_VEC_CAPACITY (size_t)8 diff --git a/source/data/vec.h b/source/data/vec.h index ce4a123..e902947 100644 --- a/source/data/vec.h +++ b/source/data/vec.h @@ -4,7 +4,9 @@ #ifndef VEC_H #define VEC_H -#include +#include +#include +#include typedef struct { size_t elem_count; diff --git a/tests/data/bstree.c b/tests/data/bstree.c index f05a703..dbf9be9 100644 --- a/tests/data/bstree.c +++ b/tests/data/bstree.c @@ -4,6 +4,7 @@ // File To Test #include +#include typedef struct { bstree_node_t node;