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
f20f4dee
Commit
f20f4dee
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 strncmpW in wcsncmp.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1ca971a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
9 deletions
+16
-9
wcs.c
dlls/msvcrt/wcs.c
+16
-9
No files found.
dlls/msvcrt/wcs.c
View file @
f20f4dee
...
...
@@ -414,6 +414,21 @@ MSVCRT_wchar_t* CDECL MSVCRT__wcslwr( MSVCRT_wchar_t* str )
}
/*********************************************************************
* wcsncmp (MSVCRT.@)
*/
int
CDECL
MSVCRT_wcsncmp
(
const
MSVCRT_wchar_t
*
str1
,
const
MSVCRT_wchar_t
*
str2
,
MSVCRT_size_t
n
)
{
if
(
!
n
)
return
0
;
while
(
--
n
&&
*
str1
&&
(
*
str1
==
*
str2
))
{
str1
++
;
str2
++
;
}
return
*
str1
-
*
str2
;
}
/*********************************************************************
* _wcsncoll_l (MSVCRT.@)
*/
int
CDECL
MSVCRT__wcsncoll_l
(
const
MSVCRT_wchar_t
*
str1
,
const
MSVCRT_wchar_t
*
str2
,
...
...
@@ -427,7 +442,7 @@ int CDECL MSVCRT__wcsncoll_l(const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* s
locinfo
=
locale
->
locinfo
;
if
(
!
locinfo
->
lc_handle
[
MSVCRT_LC_COLLATE
])
return
strncmpW
(
str1
,
str2
,
count
);
return
MSVCRT_wcsncmp
(
str1
,
str2
,
count
);
return
CompareStringW
(
locinfo
->
lc_handle
[
MSVCRT_LC_COLLATE
],
0
,
str1
,
MSVCRT_wcsnlen
(
str1
,
count
),
str2
,
MSVCRT_wcsnlen
(
str2
,
count
))
-
CSTR_EQUAL
;
...
...
@@ -2644,14 +2659,6 @@ __int64 CDECL MSVCRT__wtoi64(const MSVCRT_wchar_t *str)
}
/*********************************************************************
* wcsncmp (MSVCRT.@)
*/
int
CDECL
MSVCRT_wcsncmp
(
const
MSVCRT_wchar_t
*
str1
,
const
MSVCRT_wchar_t
*
str2
,
int
n
)
{
return
strncmpW
(
str1
,
str2
,
n
);
}
/*********************************************************************
* _wcsxfrm_l (MSVCRT.@)
*/
MSVCRT_size_t
CDECL
MSVCRT__wcsxfrm_l
(
MSVCRT_wchar_t
*
dest
,
const
MSVCRT_wchar_t
*
src
,
...
...
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