2005-09-05 20:03:06 +00:00
|
|
|
#include <ctype.h>
|
|
|
|
#include "wine/config.h"
|
|
|
|
#include "wine/port.h"
|
|
|
|
|
|
|
|
#ifndef HAVE_STRCASECMP
|
2006-09-11 21:40:50 +00:00
|
|
|
|
2008-11-26 14:28:19 +00:00
|
|
|
#ifdef _stricmp
|
|
|
|
# undef _stricmp
|
2006-09-11 21:40:50 +00:00
|
|
|
#endif
|
|
|
|
|
2008-11-26 14:28:19 +00:00
|
|
|
int _stricmp( const char *str1, const char *str2 )
|
2005-09-05 20:03:06 +00:00
|
|
|
{
|
|
|
|
const unsigned char *ustr1 = (const unsigned char *)str1;
|
|
|
|
const unsigned char *ustr2 = (const unsigned char *)str2;
|
|
|
|
|
|
|
|
while (*ustr1 && toupper(*ustr1) == toupper(*ustr2)) {
|
|
|
|
ustr1++;
|
|
|
|
ustr2++;
|
|
|
|
}
|
|
|
|
return toupper(*ustr1) - toupper(*ustr2);
|
|
|
|
}
|
|
|
|
#endif
|