diff options
author | Simon Rettberg | 2018-11-09 15:35:46 +0100 |
---|---|---|
committer | Simon Rettberg | 2018-11-09 15:35:46 +0100 |
commit | ba817d465caa48b5b814853d8f16602da2d1a8a9 (patch) | |
tree | f082b752a8e2aed477aa57ff00f7244238769b41 /proxy.c | |
parent | Remove memberOf filtering; not required for proper operation (diff) | |
download | ldadp-ba817d465caa48b5b814853d8f16602da2d1a8a9.tar.gz ldadp-ba817d465caa48b5b814853d8f16602da2d1a8a9.tar.xz ldadp-ba817d465caa48b5b814853d8f16602da2d1a8a9.zip |
Move string functions to lstring.[hc]
Diffstat (limited to 'proxy.c')
-rw-r--r-- | proxy.c | 29 |
1 files changed, 1 insertions, 28 deletions
@@ -4,6 +4,7 @@ #include "helper.h" #include "tmpbuffer.h" #include "ldap.h" +#include "lstring.h" #include <stdio.h> #include <string.h> #include <ctype.h> @@ -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) |