From ba817d465caa48b5b814853d8f16602da2d1a8a9 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 9 Nov 2018 15:35:46 +0100 Subject: Move string functions to lstring.[hc] --- proxy.c | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) (limited to 'proxy.c') diff --git a/proxy.c b/proxy.c index 3d06cbe..98151a4 100644 --- a/proxy.c +++ b/proxy.c @@ -4,6 +4,7 @@ #include "helper.h" #include "tmpbuffer.h" #include "ldap.h" +#include "lstring.h" #include #include #include @@ -68,14 +69,6 @@ static struct string s_bogusfieldname42, s_bogusfieldname43; static struct string str_ADUSER, str_ADUSERDN; // HACK -static BOOL isInt(struct string *value, int start) -{ - size_t i; - for (i = start; i < value->l; ++i) { - if (value->s[i] < '0' || value->s[i] > '9') return FALSE; - } - return TRUE; -} static void fixUnNumeric(struct string *value) { if (value == NULL || value->l < 2) return; @@ -335,26 +328,6 @@ static void pref(int spaces, char prefix) } */ -static inline int equals(struct string *a, struct string *b) -{ - if (a->l != b->l) return 0; - if (a->s == b->s) return 1; - return strncmp(a->s, b->s, a->l) == 0; -} - -/** - * b MUST be in lowercase already. - */ -static inline int iequals(const struct string * const a, const struct string * const b) -{ - if (a->l != b->l) return 0; - if (a->s == b->s) return 1; - for (size_t i = 0; i < a->l; ++i) { - if (tolower(a->s[i]) != b->s[i]) return 0; - } - return 1; -} - // ---- client to AD replacements //#define PREF(...) do { pref(spaces, prefix); printf(__VA_ARGS__); } while (0) -- cgit v1.2.3-55-g7522