Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
3e049b6b
Commit
3e049b6b
authored
Mar 27, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use wcsicmp() instead of strcmpiW() where possible.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6226be36
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
16 additions
and
14 deletions
+16
-14
actctx.c
dlls/ntdll/actctx.c
+1
-1
loader.c
dlls/ntdll/loader.c
+3
-3
loadorder.c
dlls/ntdll/loadorder.c
+1
-1
locale.c
dlls/ntdll/locale.c
+2
-2
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+2
-0
path.c
dlls/ntdll/path.c
+1
-1
process.c
dlls/ntdll/process.c
+1
-1
relay.c
dlls/ntdll/relay.c
+2
-2
version.c
dlls/ntdll/version.c
+3
-3
No files found.
dlls/ntdll/actctx.c
View file @
3e049b6b
...
...
@@ -3101,7 +3101,7 @@ static WCHAR *lookup_manifest_file( HANDLE dir, struct assembly_identity *ai )
unsigned
int
data_pos
=
0
,
data_len
;
char
buffer
[
8192
];
if
(
!
lang
||
!
strcmpiW
(
lang
,
neutralW
))
lang
=
wildcardW
;
if
(
!
lang
||
!
wcsicmp
(
lang
,
neutralW
))
lang
=
wildcardW
;
if
(
!
(
lookup
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
(
strlenW
(
ai
->
arch
)
+
strlenW
(
ai
->
name
)
...
...
dlls/ntdll/loader.c
View file @
3e049b6b
...
...
@@ -951,7 +951,7 @@ static BOOL is_dll_native_subsystem( LDR_MODULE *mod, const IMAGE_NT_HEADERS *nt
DWORD
len
=
strlen
(
name
);
if
(
len
*
sizeof
(
WCHAR
)
>=
sizeof
(
buffer
))
continue
;
ascii_to_unicode
(
buffer
,
name
,
len
+
1
);
if
(
!
strcmpiW
(
buffer
,
ntdllW
)
||
!
strcmpiW
(
buffer
,
kernel32W
))
if
(
!
wcsicmp
(
buffer
,
ntdllW
)
||
!
wcsicmp
(
buffer
,
kernel32W
))
{
TRACE
(
"%s imports %s, assuming not native
\n
"
,
debugstr_w
(
filename
),
debugstr_w
(
buffer
)
);
return
FALSE
;
...
...
@@ -1761,7 +1761,7 @@ static BOOL get_builtin_fullname( UNICODE_STRING *nt_name, const UNICODE_STRING
p
++
;
for
(
i
=
0
;
i
<
len
;
i
++
)
if
(
tolowerW
(
p
[
i
])
!=
tolowerW
(
(
WCHAR
)
filename
[
i
])
)
break
;
if
(
i
==
len
&&
(
!
p
[
len
]
||
!
strcmpiW
(
p
+
len
,
soW
)))
if
(
i
==
len
&&
(
!
p
[
len
]
||
!
wcsicmp
(
p
+
len
,
soW
)))
{
/* the filename matches, use path as the full path */
len
+=
p
-
path
->
Buffer
;
...
...
@@ -2768,7 +2768,7 @@ static NTSTATUS find_actctx_dll( LPCWSTR libname, LPWSTR *fullname )
DWORD
dirlen
=
info
->
ulAssemblyDirectoryNameLength
/
sizeof
(
WCHAR
);
p
++
;
if
(
!
dirlen
||
strncmpiW
(
p
,
info
->
lpAssemblyDirectoryName
,
dirlen
)
||
strcmpiW
(
p
+
dirlen
,
dotManifestW
))
if
(
!
dirlen
||
strncmpiW
(
p
,
info
->
lpAssemblyDirectoryName
,
dirlen
)
||
wcsicmp
(
p
+
dirlen
,
dotManifestW
))
{
/* manifest name does not match directory name, so it's not a global
* windows/winsxs manifest; use the manifest directory name instead */
...
...
dlls/ntdll/loadorder.c
View file @
3e049b6b
...
...
@@ -65,7 +65,7 @@ static struct loadorder_list env_list;
*/
static
int
cmp_sort_func
(
const
void
*
s1
,
const
void
*
s2
)
{
return
strcmpiW
(((
const
module_loadorder_t
*
)
s1
)
->
modulename
,
((
const
module_loadorder_t
*
)
s2
)
->
modulename
);
return
wcsicmp
(((
const
module_loadorder_t
*
)
s1
)
->
modulename
,
((
const
module_loadorder_t
*
)
s2
)
->
modulename
);
}
...
...
dlls/ntdll/locale.c
View file @
3e049b6b
...
...
@@ -1703,13 +1703,13 @@ NTSTATUS WINAPI RtlLocaleNameToLcid( const WCHAR *name, LCID *lcid, ULONG flags
if
(
PRIMARYLANGID
(
id
)
==
LANG_NEUTRAL
)
continue
;
if
(
!
load_string
(
LOCALE_SNAME
,
id
,
buf
,
ARRAY_SIZE
(
buf
)
)
&&
!
strcmpiW
(
name
,
buf
))
if
(
!
load_string
(
LOCALE_SNAME
,
id
,
buf
,
ARRAY_SIZE
(
buf
)
)
&&
!
wcsicmp
(
name
,
buf
))
{
*
lcid
=
MAKELCID
(
id
,
SORT_DEFAULT
);
/* FIXME: handle sort order */
goto
found
;
}
if
(
load_string
(
LOCALE_SISO639LANGNAME
,
id
,
buf
,
ARRAY_SIZE
(
buf
)
)
||
strcmpiW
(
lang
,
buf
))
if
(
load_string
(
LOCALE_SISO639LANGNAME
,
id
,
buf
,
ARRAY_SIZE
(
buf
)
)
||
wcsicmp
(
lang
,
buf
))
continue
;
if
(
script
)
...
...
dlls/ntdll/ntdll_misc.h
View file @
3e049b6b
...
...
@@ -296,4 +296,6 @@ LPWSTR __cdecl NTDLL_wcstok( LPWSTR str, LPCWSTR delim );
LONG
__cdecl
NTDLL_wcstol
(
LPCWSTR
s
,
LPWSTR
*
end
,
INT
base
);
ULONG
__cdecl
NTDLL_wcstoul
(
LPCWSTR
s
,
LPWSTR
*
end
,
INT
base
);
#define wcsicmp(s1,s2) NTDLL__wcsicmp(s1,s2)
#endif
dlls/ntdll/path.c
View file @
3e049b6b
...
...
@@ -280,7 +280,7 @@ ULONG WINAPI RtlIsDosDeviceName_U( PCWSTR dos_name )
case
UNC_PATH
:
return
0
;
case
DEVICE_PATH
:
if
(
!
strcmpiW
(
dos_name
,
consoleW
))
if
(
!
wcsicmp
(
dos_name
,
consoleW
))
return
MAKELONG
(
sizeof
(
conW
),
4
*
sizeof
(
WCHAR
)
);
/* 4 is length of \\.\ prefix */
return
0
;
case
ABSOLUTE_DRIVE_PATH
:
...
...
dlls/ntdll/process.c
View file @
3e049b6b
...
...
@@ -1579,7 +1579,7 @@ NTSTATUS restart_process( RTL_USER_PROCESS_PARAMETERS *params, NTSTATUS status )
/* check for .com or .pif extension */
if
(
status
==
STATUS_INVALID_IMAGE_NOT_MZ
&&
(
p
=
strrchrW
(
params
->
ImagePathName
.
Buffer
,
'.'
))
&&
(
!
strcmpiW
(
p
,
comW
)
||
!
strcmpiW
(
p
,
pifW
)))
(
!
wcsicmp
(
p
,
comW
)
||
!
wcsicmp
(
p
,
pifW
)))
status
=
STATUS_INVALID_IMAGE_WIN_16
;
switch
(
status
)
...
...
dlls/ntdll/relay.c
View file @
3e049b6b
...
...
@@ -292,9 +292,9 @@ static BOOL check_from_module( const WCHAR **includelist, const WCHAR **excludel
{
int
len
;
if
(
!
strcmpiW
(
*
listitem
,
module
))
return
!
show
;
if
(
!
wcsicmp
(
*
listitem
,
module
))
return
!
show
;
len
=
strlenW
(
*
listitem
);
if
(
!
strncmpiW
(
*
listitem
,
module
,
len
)
&&
!
strcmpiW
(
module
+
len
,
dllW
))
if
(
!
strncmpiW
(
*
listitem
,
module
,
len
)
&&
!
wcsicmp
(
module
+
len
,
dllW
))
return
!
show
;
}
return
show
;
...
...
dlls/ntdll/version.c
View file @
3e049b6b
...
...
@@ -343,9 +343,9 @@ static BOOL get_nt_registry_version( RTL_OSVERSIONINFOEXW *version )
{
WCHAR
*
str
=
(
WCHAR
*
)
info
->
Data
;
str
[
info
->
DataLength
/
sizeof
(
WCHAR
)]
=
0
;
if
(
!
strcmpiW
(
str
,
WinNTW
))
version
->
wProductType
=
VER_NT_WORKSTATION
;
else
if
(
!
strcmpiW
(
str
,
LanmanNTW
))
version
->
wProductType
=
VER_NT_DOMAIN_CONTROLLER
;
else
if
(
!
strcmpiW
(
str
,
ServerNTW
))
version
->
wProductType
=
VER_NT_SERVER
;
if
(
!
wcsicmp
(
str
,
WinNTW
))
version
->
wProductType
=
VER_NT_WORKSTATION
;
else
if
(
!
wcsicmp
(
str
,
LanmanNTW
))
version
->
wProductType
=
VER_NT_DOMAIN_CONTROLLER
;
else
if
(
!
wcsicmp
(
str
,
ServerNTW
))
version
->
wProductType
=
VER_NT_SERVER
;
}
NtClose
(
hkey2
);
}
...
...
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