Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
ea4d756c
Commit
ea4d756c
authored
Apr 02, 2019
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
krnl386.exe16: Don't use strncasecmp.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cef4d346
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
atom.c
dlls/krnl386.exe16/atom.c
+3
-3
ne_module.c
dlls/krnl386.exe16/ne_module.c
+1
-1
resource.c
dlls/krnl386.exe16/resource.c
+4
-4
snoop.c
dlls/krnl386.exe16/snoop.c
+1
-1
No files found.
dlls/krnl386.exe16/atom.c
View file @
ea4d756c
...
...
@@ -108,7 +108,7 @@ static WORD ATOM_Hash(
TRACE
(
"%x, %s, %x
\n
"
,
entries
,
str
,
len
);
for
(
i
=
0
;
i
<
len
;
i
++
)
hash
^=
touppe
r
(
str
[
i
])
+
i
;
for
(
i
=
0
;
i
<
len
;
i
++
)
hash
^=
RtlUpperCha
r
(
str
[
i
])
+
i
;
return
hash
%
entries
;
}
...
...
@@ -223,7 +223,7 @@ ATOM WINAPI AddAtom16( LPCSTR str )
{
entryPtr
=
ATOM_MakePtr
(
entry
);
if
((
entryPtr
->
length
==
len
)
&&
(
!
strncase
cmp
(
entryPtr
->
str
,
buffer
,
len
)))
(
!
_strni
cmp
(
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
)
&&
(
!
strncase
cmp
(
entryPtr
->
str
,
str
,
len
)))
(
!
_strni
cmp
(
entryPtr
->
str
,
str
,
len
)))
{
TRACE
(
"-- found %x
\n
"
,
entry
);
return
HANDLETOATOM
(
entry
);
...
...
dlls/krnl386.exe16/ne_module.c
View file @
ea4d756c
...
...
@@ -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
strncase
cmp is WRONG. It should not be case insensitive,
/* FIXME: the
_strni
cmp 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
...
...
dlls/krnl386.exe16/resource.c
View file @
ea4d756c
...
...
@@ -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
)
&&
!
strncase
cmp
(
(
char
*
)
p
+
1
,
str
,
len
))
if
((
*
p
==
len
)
&&
!
_strni
cmp
(
(
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
)
&&
!
strncase
cmp
(
(
char
*
)
p
+
1
,
str
,
len
))
if
((
*
p
==
len
)
&&
!
_strni
cmp
(
(
char
*
)
p
+
1
,
str
,
len
))
return
pNameInfo
;
}
}
...
...
dlls/krnl386.exe16/snoop.c
View file @
ea4d756c
...
...
@@ -224,7 +224,7 @@ SNOOP16_GetProcAddress16(HMODULE16 hmod,DWORD ordinal,FARPROC16 origfun) {
if
(
strchr
(
fun
->
name
,
'_'
))
{
char
*
s
=
strchr
(
fun
->
name
,
'_'
);
if
(
!
strncase
cmp
(
s
,
"_thunkdata"
,
10
))
{
if
(
!
_strni
cmp
(
s
,
"_thunkdata"
,
10
))
{
HeapFree
(
GetProcessHeap
(),
0
,
fun
->
name
);
fun
->
name
=
NULL
;
return
origfun
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment