From 46f4d80c4c40559a383d001838d766b2b438f4f0 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 9 Oct 2025 17:14:56 +0000 Subject: Move string cmp operations to skalibs. Add cgit-nollmcrawler. --- src/config/deps-exe/tipidee-config | 1 - src/config/tipidee-config-internal.h | 7 ++----- src/config/util.c | 15 --------------- 3 files changed, 2 insertions(+), 21 deletions(-) delete mode 100644 src/config/util.c (limited to 'src/config') 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 #include +#include #include #include #include @@ -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 - -#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) ; -} -- cgit v1.3.1