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
1ca971a2
Commit
1ca971a2
authored
Jul 14, 2020
by
Piotr Caban
Committed by
Alexandre Julliard
Jul 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Don't use strcmpiW in _wcsicmp_l.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8fd5ef68
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
31 deletions
+38
-31
wcs.c
dlls/msvcrt/wcs.c
+38
-31
No files found.
dlls/msvcrt/wcs.c
View file @
1ca971a2
...
...
@@ -86,12 +86,48 @@ MSVCRT_wchar_t* CDECL MSVCRT__wcsdup( const MSVCRT_wchar_t* str )
return
ret
;
}
/*********************************************************************
* _towlower_l (MSVCRT.@)
*/
int
CDECL
MSVCRT__towlower_l
(
MSVCRT_wint_t
c
,
MSVCRT__locale_t
locale
)
{
MSVCRT_pthreadlocinfo
locinfo
;
if
(
!
locale
)
locinfo
=
get_locinfo
();
else
locinfo
=
locale
->
locinfo
;
if
(
!
locinfo
->
lc_handle
[
MSVCRT_LC_CTYPE
])
{
if
(
c
>=
'A'
&&
c
<=
'Z'
)
return
c
+
'a'
-
'A'
;
return
c
;
}
return
tolowerW
(
c
);
}
/*********************************************************************
* towlower (MSVCRT.@)
*/
int
CDECL
MSVCRT_towlower
(
MSVCRT_wint_t
c
)
{
return
MSVCRT__towlower_l
(
c
,
NULL
);
}
INT
CDECL
MSVCRT__wcsicmp_l
(
const
MSVCRT_wchar_t
*
str1
,
const
MSVCRT_wchar_t
*
str2
,
MSVCRT__locale_t
locale
)
{
MSVCRT_wchar_t
c1
,
c2
;
if
(
!
MSVCRT_CHECK_PMT
(
str1
!=
NULL
)
||
!
MSVCRT_CHECK_PMT
(
str2
!=
NULL
))
return
MSVCRT__NLSCMPERROR
;
return
strcmpiW
(
str1
,
str2
);
do
{
c1
=
MSVCRT__towlower_l
(
*
str1
++
,
locale
);
c2
=
MSVCRT__towlower_l
(
*
str2
++
,
locale
);
}
while
(
c1
&&
(
c1
==
c2
));
return
c1
-
c2
;
}
/*********************************************************************
...
...
@@ -99,7 +135,7 @@ INT CDECL MSVCRT__wcsicmp_l(const MSVCRT_wchar_t *str1, const MSVCRT_wchar_t *st
*/
INT
CDECL
MSVCRT__wcsicmp
(
const
MSVCRT_wchar_t
*
str1
,
const
MSVCRT_wchar_t
*
str2
)
{
return
strcmpiW
(
str1
,
str2
);
return
MSVCRT__wcsicmp_l
(
str1
,
str2
,
NULL
);
}
/*********************************************************************
...
...
@@ -2541,35 +2577,6 @@ int CDECL MSVCRT_towupper(MSVCRT_wint_t c)
}
/*********************************************************************
* _towlower_l (MSVCRT.@)
*/
int
CDECL
MSVCRT__towlower_l
(
MSVCRT_wint_t
c
,
MSVCRT__locale_t
locale
)
{
MSVCRT_pthreadlocinfo
locinfo
;
if
(
!
locale
)
locinfo
=
get_locinfo
();
else
locinfo
=
locale
->
locinfo
;
if
(
!
locinfo
->
lc_handle
[
MSVCRT_LC_CTYPE
])
{
if
(
c
>=
'A'
&&
c
<=
'Z'
)
return
c
+
'a'
-
'A'
;
return
c
;
}
return
tolowerW
(
c
);
}
/*********************************************************************
* towlower (MSVCRT.@)
*/
int
CDECL
MSVCRT_towlower
(
MSVCRT_wint_t
c
)
{
return
MSVCRT__towlower_l
(
c
,
NULL
);
}
/*********************************************************************
* wcschr (MSVCRT.@)
*/
MSVCRT_wchar_t
*
CDECL
MSVCRT_wcschr
(
const
MSVCRT_wchar_t
*
str
,
MSVCRT_wchar_t
ch
)
...
...
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