mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-02 14:15:46 +01:00
- added strcasecmp() to WINGs (only on systems that don't have it)
- removed some redundant includes of ../src/config.h where wconfig.h is also included
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
|
||||
#include "wconfig.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
@@ -217,4 +219,17 @@ wstrappend(char *dst, char *src)
|
||||
}
|
||||
|
||||
|
||||
#ifndef HAVE_STRCASECMP
|
||||
int
|
||||
strcasecmp(const char *s1, const char *s2)
|
||||
{
|
||||
while (*s1 && *s2 && (tolower(*s1)==tolower(*s2))) {
|
||||
s1++;
|
||||
s2++;
|
||||
}
|
||||
|
||||
return (tolower(*s1) - tolower(*s2));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user