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
588db48b
Commit
588db48b
authored
Feb 14, 2024
by
Daniel Lehman
Committed by
Alexandre Julliard
Feb 19, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Use string sort for strncoll/wcsncoll.
parent
65109c72
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
string.c
dlls/msvcrt/string.c
+1
-1
string.c
dlls/msvcrt/tests/string.c
+6
-0
wcs.c
dlls/msvcrt/wcs.c
+1
-1
No files found.
dlls/msvcrt/string.c
View file @
588db48b
...
...
@@ -1213,7 +1213,7 @@ int CDECL _strncoll_l( const char* str1, const char* str2, size_t count, _locale
if
(
!
locinfo
->
lc_handle
[
LC_COLLATE
])
return
strncmp
(
str1
,
str2
,
count
);
return
CompareStringA
(
locinfo
->
lc_handle
[
LC_COLLATE
],
0
,
return
CompareStringA
(
locinfo
->
lc_handle
[
LC_COLLATE
],
SORT_STRINGSORT
,
str1
,
strnlen
(
str1
,
count
),
str2
,
strnlen
(
str2
,
count
))
-
CSTR_EQUAL
;
}
...
...
dlls/msvcrt/tests/string.c
View file @
588db48b
...
...
@@ -4154,6 +4154,9 @@ static void test__tcsncoll(void)
{
"English"
,
"ABCe"
,
"ABCf"
,
3
,
0
},
{
"English"
,
"abcd"
,
"ABCD"
,
10
,
-
1
},
{
"English"
,
"AB D"
,
"AB-D"
,
4
,
1
},
{
"English"
,
"AB D"
,
"AB'D"
,
4
,
1
},
{
"C"
,
"ABCD"
,
"ABCD"
,
4
,
0
},
{
"C"
,
"ABCD"
,
"ABCD"
,
10
,
0
},
...
...
@@ -4165,6 +4168,9 @@ static void test__tcsncoll(void)
{
"C"
,
"ABCe"
,
"ABCf"
,
3
,
0
},
{
"C"
,
"abcd"
,
"ABCD"
,
10
,
1
},
{
"C"
,
"AB D"
,
"AB-D"
,
4
,
-
1
},
{
"C"
,
"AB D"
,
"AB'D"
,
4
,
-
1
},
};
WCHAR
str1W
[
16
];
WCHAR
str2W
[
16
];
...
...
dlls/msvcrt/wcs.c
View file @
588db48b
...
...
@@ -538,7 +538,7 @@ int CDECL _wcsncoll_l(const wchar_t* str1, const wchar_t* str2,
if
(
!
locinfo
->
lc_handle
[
LC_COLLATE
])
return
wcsncmp
(
str1
,
str2
,
count
);
return
CompareStringW
(
locinfo
->
lc_handle
[
LC_COLLATE
],
0
,
return
CompareStringW
(
locinfo
->
lc_handle
[
LC_COLLATE
],
SORT_STRINGSORT
,
str1
,
wcsnlen
(
str1
,
count
),
str2
,
wcsnlen
(
str2
,
count
))
-
CSTR_EQUAL
;
}
...
...
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