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
1cde8696
Commit
1cde8696
authored
Mar 30, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Avoid using toupperW().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
34f3e779
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
14 deletions
+13
-14
directory.c
dlls/ntdll/directory.c
+2
-2
loadorder.c
dlls/ntdll/loadorder.c
+7
-10
locale.c
dlls/ntdll/locale.c
+2
-1
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+1
-0
path.c
dlls/ntdll/path.c
+1
-1
No files found.
dlls/ntdll/directory.c
View file @
1cde8696
...
...
@@ -1394,7 +1394,7 @@ static BOOLEAN match_filename( const UNICODE_STRING *name_str, const UNICODE_STR
if
(
is_case_sensitive
)
while
(
name
<
name_end
&&
(
*
name
!=
*
mask
))
name
++
;
else
while
(
name
<
name_end
&&
(
to
upperW
(
*
name
)
!=
toupperW
(
*
mask
)))
name
++
;
while
(
name
<
name_end
&&
(
to
wupper
(
*
name
)
!=
towupper
(
*
mask
)))
name
++
;
next_to_retry
=
name
;
break
;
case
'?'
:
...
...
@@ -1403,7 +1403,7 @@ static BOOLEAN match_filename( const UNICODE_STRING *name_str, const UNICODE_STR
break
;
default:
if
(
is_case_sensitive
)
mismatch
=
(
*
mask
!=
*
name
);
else
mismatch
=
(
to
upperW
(
*
mask
)
!=
toupperW
(
*
name
));
else
mismatch
=
(
to
wupper
(
*
mask
)
!=
towupper
(
*
name
));
if
(
!
mismatch
)
{
...
...
dlls/ntdll/loadorder.c
View file @
1cde8696
...
...
@@ -89,13 +89,12 @@ static const WCHAR *get_basename( const WCHAR *name )
*
* Remove extension if it is ".dll".
*/
static
inline
void
remove_dll_ext
(
WCHAR
*
ext
)
static
inline
void
remove_dll_ext
(
WCHAR
*
name
)
{
if
(
ext
[
0
]
==
'.'
&&
toupperW
(
ext
[
1
])
==
'D'
&&
toupperW
(
ext
[
2
])
==
'L'
&&
toupperW
(
ext
[
3
])
==
'L'
&&
!
ext
[
4
])
ext
[
0
]
=
0
;
static
const
WCHAR
dllW
[]
=
{
'.'
,
'd'
,
'l'
,
'l'
,
0
};
WCHAR
*
p
=
strrchrW
(
name
,
'.'
);
if
(
p
&&
!
wcsicmp
(
p
,
dllW
))
*
p
=
0
;
}
...
...
@@ -213,8 +212,7 @@ static void add_load_order_set( WCHAR *entry )
if
(
*
end
)
*
end
++
=
0
;
if
(
*
entry
)
{
WCHAR
*
ext
=
strrchrW
(
entry
,
'.'
);
if
(
ext
)
remove_dll_ext
(
ext
);
remove_dll_ext
(
entry
);
ldo
.
modulename
=
entry
;
add_load_order
(
&
ldo
);
entry
=
end
;
...
...
@@ -457,10 +455,9 @@ enum loadorder get_load_order( const WCHAR *app_name, const UNICODE_STRING *nt_n
if
(
!
(
len
=
strlenW
(
path
)))
return
ret
;
if
(
!
(
module
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
(
len
+
2
)
*
sizeof
(
WCHAR
)
)))
return
ret
;
strcpyW
(
module
+
1
,
path
);
/* reserve module[0] for the wildcard char */
remove_dll_ext
(
module
+
1
);
basename
=
(
WCHAR
*
)
get_basename
(
module
+
1
);
if
(
len
>=
4
)
remove_dll_ext
(
module
+
1
+
len
-
4
);
/* first explicit module name */
if
((
ret
=
get_load_order_value
(
std_key
,
app_key
,
module
+
1
))
!=
LO_INVALID
)
goto
done
;
...
...
dlls/ntdll/locale.c
View file @
1cde8696
...
...
@@ -1638,7 +1638,8 @@ WCHAR __cdecl NTDLL_towlower( WCHAR ch )
*/
WCHAR
__cdecl
NTDLL_towupper
(
WCHAR
ch
)
{
return
casemap
(
nls_info
.
UpperCaseTable
,
ch
);
if
(
nls_info
.
UpperCaseTable
)
return
casemap
(
nls_info
.
UpperCaseTable
,
ch
);
return
casemap_ascii
(
ch
);
}
...
...
dlls/ntdll/ntdll_misc.h
View file @
1cde8696
...
...
@@ -298,6 +298,7 @@ ULONG __cdecl NTDLL_wcstoul( LPCWSTR s, LPWSTR *end, INT base );
#define wcsicmp(s1,s2) NTDLL__wcsicmp(s1,s2)
#define wcsnicmp(s1,s2,n) NTDLL__wcsnicmp(s1,s2,n)
#define towupper(c) NTDLL_towupper(c)
#define wcslwr(s) NTDLL__wcslwr(s)
#define wcsupr(s) NTDLL__wcsupr(s)
...
...
dlls/ntdll/path.c
View file @
1cde8696
...
...
@@ -670,7 +670,7 @@ static ULONG get_full_path_helper(LPCWSTR name, LPWSTR buffer, ULONG size)
case
RELATIVE_DRIVE_PATH
:
/* c:foo */
dep
=
2
;
if
(
toupperW
(
name
[
0
])
!=
toupperW
(
cd
->
Buffer
[
0
])
||
cd
->
Buffer
[
1
]
!=
':'
)
if
(
wcsnicmp
(
name
,
cd
->
Buffer
,
2
)
)
{
UNICODE_STRING
var
,
val
;
...
...
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