Commit ea4d756c authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

krnl386.exe16: Don't use strncasecmp.

parent cef4d346
......@@ -108,7 +108,7 @@ static WORD ATOM_Hash(
TRACE("%x, %s, %x\n", entries, str, len);
for (i = 0; i < len; i++) hash ^= toupper(str[i]) + i;
for (i = 0; i < len; i++) hash ^= RtlUpperChar(str[i]) + i;
return hash % entries;
}
......@@ -223,7 +223,7 @@ ATOM WINAPI AddAtom16( LPCSTR str )
{
entryPtr = ATOM_MakePtr( entry );
if ((entryPtr->length == len) &&
(!strncasecmp( entryPtr->str, buffer, len )))
(!_strnicmp( entryPtr->str, buffer, len )))
{
entryPtr->refCount++;
TRACE("-- existing 0x%x\n", entry);
......@@ -310,7 +310,7 @@ ATOM WINAPI FindAtom16( LPCSTR str )
{
ATOMENTRY * entryPtr = ATOM_MakePtr( entry );
if ((entryPtr->length == len) &&
(!strncasecmp( entryPtr->str, str, len )))
(!_strnicmp( entryPtr->str, str, len )))
{
TRACE("-- found %x\n", entry);
return HANDLETOATOM( entry );
......
......@@ -1455,7 +1455,7 @@ HMODULE16 WINAPI GetModuleHandle16( LPCSTR name )
if (pModule->ne_flags & NE_FFLAGS_WIN32) continue;
name_table = (BYTE *)pModule + pModule->ne_restab;
/* FIXME: the strncasecmp is WRONG. It should not be case insensitive,
/* FIXME: the _strnicmp is WRONG. It should not be case insensitive,
* but case sensitive! (Unfortunately Winword 6 and subdlls have
* lowercased module names, but try to load uppercase DLLs, so this
* 'i' compare is just a quickfix until the loader handles that
......
......@@ -213,7 +213,7 @@ static DWORD NE_FindNameTableId( NE_MODULE *pModule, LPCSTR typeId, LPCSTR resId
if (p[1] & 0x8000)
{
if (!HIWORD(typeId)) continue;
if (strcasecmp( typeId, (char *)(p + 3) )) continue;
if (_strnicmp( typeId, (char *)(p + 3), -1 )) continue;
}
else if (HIWORD(typeId) || (((DWORD)typeId & ~0x8000)!= p[1]))
continue;
......@@ -223,7 +223,7 @@ static DWORD NE_FindNameTableId( NE_MODULE *pModule, LPCSTR typeId, LPCSTR resId
if (p[2] & 0x8000)
{
if (!HIWORD(resId)) continue;
if (strcasecmp( resId, (char*)(p+3)+strlen((char*)(p+3))+1 )) continue;
if (_strnicmp( resId, (char*)(p+3)+strlen((char*)(p+3))+1, -1 )) continue;
}
else if (HIWORD(resId) || ((LOWORD(resId) & ~0x8000) != p[2]))
......@@ -261,7 +261,7 @@ static NE_TYPEINFO *NE_FindTypeSection( LPBYTE pResTab, NE_TYPEINFO *pTypeInfo,
if (!(pTypeInfo->type_id & 0x8000))
{
BYTE *p = pResTab + pTypeInfo->type_id;
if ((*p == len) && !strncasecmp( (char*)p+1, str, len ))
if ((*p == len) && !_strnicmp( (char*)p+1, str, len ))
{
TRACE(" Found type '%s'\n", str );
return pTypeInfo;
......@@ -308,7 +308,7 @@ static NE_NAMEINFO *NE_FindResourceFromType( LPBYTE pResTab, NE_TYPEINFO *pTypeI
{
if (pNameInfo->id & 0x8000) continue;
p = pResTab + pNameInfo->id;
if ((*p == len) && !strncasecmp( (char*)p+1, str, len ))
if ((*p == len) && !_strnicmp( (char*)p+1, str, len ))
return pNameInfo;
}
}
......
......@@ -224,7 +224,7 @@ SNOOP16_GetProcAddress16(HMODULE16 hmod,DWORD ordinal,FARPROC16 origfun) {
if (strchr(fun->name,'_')) {
char *s=strchr(fun->name,'_');
if (!strncasecmp(s,"_thunkdata",10)) {
if (!_strnicmp(s,"_thunkdata",10)) {
HeapFree(GetProcessHeap(),0,fun->name);
fun->name = NULL;
return origfun;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment