00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifdef HAVE_CONFIG_H
00018 #include "config.h"
00019 #endif
00020
00021 #ifndef HAVE_STRCASECMP
00022
00023 #include <string.h>
00024 #include <ctype.h>
00025
00026
00027 int strcasecmp(const char *s1, const char *s2)
00028 {
00029 while ((*s1 != '\0')
00030 && (tolower(*(unsigned char *) s1) ==
00031 tolower(*(unsigned char *) s2))) {
00032 s1++;
00033 s2++;
00034 }
00035
00036 return tolower(*(unsigned char *) s1) - tolower(*(unsigned char *) s2);
00037 }
00038
00039 #endif