degesch: add & use strncasecmp_ascii()
This commit is contained in:
11
common.c
11
common.c
@@ -70,6 +70,17 @@ str_vector_find (const struct str_vector *v, const char *s)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int
|
||||
strncasecmp_ascii (const char *a, const char *b, size_t n)
|
||||
{
|
||||
int x;
|
||||
while (n-- && (*a || *b))
|
||||
if ((x = tolower_ascii (*(const unsigned char *) a++)
|
||||
- tolower_ascii (*(const unsigned char *) b++)))
|
||||
return x;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// --- Logging -----------------------------------------------------------------
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user