diff options
Diffstat (limited to 'src/config')
| -rw-r--r-- | src/config/deps-exe/tipidee-config | 1 | ||||
| -rw-r--r-- | src/config/tipidee-config-internal.h | 7 | ||||
| -rw-r--r-- | src/config/util.c | 15 |
3 files changed, 2 insertions, 21 deletions
diff --git a/src/config/deps-exe/tipidee-config b/src/config/deps-exe/tipidee-config index 2e844d8..55cf760 100644 --- a/src/config/deps-exe/tipidee-config +++ b/src/config/deps-exe/tipidee-config @@ -1,4 +1,3 @@ -util.o node.o repo.o conftree.o diff --git a/src/config/tipidee-config-internal.h b/src/config/tipidee-config-internal.h index d3977c0..c9849f2 100644 --- a/src/config/tipidee-config-internal.h +++ b/src/config/tipidee-config-internal.h @@ -7,6 +7,7 @@ #include <string.h> #include <stdlib.h> +#include <skalibs/bytestr.h> #include <skalibs/buffer.h> #include <skalibs/strerr.h> #include <skalibs/stralloc.h> @@ -45,11 +46,7 @@ struct global_s extern struct global_s g ; - - /* util */ - -extern int keycmp (void const *, void const *) ; /* for any struct starting with a string key */ -#define BSEARCH(type, key, array) bsearch(key, (array), sizeof(array)/sizeof(type), sizeof(type), &keycmp) +#define BSEARCH(type, key, array) bsearch(key, (array), sizeof(array)/sizeof(type), sizeof(type), &stringkey_bcmp) /* node */ diff --git a/src/config/util.c b/src/config/util.c deleted file mode 100644 index bee1503..0000000 --- a/src/config/util.c +++ /dev/null @@ -1,15 +0,0 @@ -/* ISC license. */ - -#include <string.h> - -#include "tipidee-config-internal.h" - -struct starts_with_a_string_key_s -{ - char const *s ; -} ; - -int keycmp (void const *a, void const *b) -{ - return strcmp((char const *)a, ((struct starts_with_a_string_key_s const *)b)->s) ; -} |
