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
4a6e69ad
Commit
4a6e69ad
authored
May 21, 2019
by
Piotr Caban
Committed by
Alexandre Julliard
May 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libwine: Ignore 0 weights as described in Unicode collation algorithm.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
40a1a9e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
10 deletions
+26
-10
locale.c
dlls/kernel32/tests/locale.c
+4
-4
sortkey.c
libs/port/sortkey.c
+22
-6
No files found.
dlls/kernel32/tests/locale.c
View file @
4a6e69ad
...
...
@@ -2043,9 +2043,9 @@ static void test_CompareStringW(void)
ok
(
ret
==
CSTR_GREATER_THAN
,
"expected CSTR_GREATER_THAN, got %d
\n
"
,
ret
);
ret
=
CompareStringW
(
CP_ACP
,
0
,
ABC_EE
,
4
,
A_ACUTE_BC
,
4
);
todo_wine
ok
(
ret
==
CSTR_LESS_THAN
,
"expected CSTR_LESS_THAN, got %d
\n
"
,
ret
);
ok
(
ret
==
CSTR_LESS_THAN
,
"expected CSTR_LESS_THAN, got %d
\n
"
,
ret
);
ret
=
CompareStringW
(
CP_ACP
,
0
,
ABC_EE
,
4
,
A_ACUTE_BC_DECOMP
,
5
);
todo_wine
ok
(
ret
==
CSTR_LESS_THAN
,
"expected CSTR_LESS_THAN, got %d
\n
"
,
ret
);
ok
(
ret
==
CSTR_LESS_THAN
,
"expected CSTR_LESS_THAN, got %d
\n
"
,
ret
);
ret
=
CompareStringW
(
CP_ACP
,
0
,
A_ACUTE_BC
,
4
,
A_ACUTE_BC_DECOMP
,
5
);
ok
(
ret
==
CSTR_EQUAL
,
"expected CSTR_EQUAL, got %d
\n
"
,
ret
);
...
...
@@ -2057,9 +2057,9 @@ static void test_CompareStringW(void)
ok
(
ret
==
CSTR_EQUAL
,
"expected CSTR_EQUAL, got %d
\n
"
,
ret
);
ret
=
CompareStringW
(
CP_ACP
,
0
,
ABC_EE
,
4
,
A_NULL_BC
,
4
);
todo_wine
ok
(
ret
==
CSTR_EQUAL
,
"expected CSTR_LESS_THAN, got %d
\n
"
,
ret
);
ok
(
ret
==
CSTR_EQUAL
,
"expected CSTR_LESS_THAN, got %d
\n
"
,
ret
);
ret
=
CompareStringW
(
CP_ACP
,
NORM_IGNORENONSPACE
,
ABC_EE
,
4
,
A_NULL_BC
,
4
);
todo_wine
ok
(
ret
==
CSTR_EQUAL
,
"expected CSTR_EQUAL, got %d
\n
"
,
ret
);
ok
(
ret
==
CSTR_EQUAL
,
"expected CSTR_EQUAL, got %d
\n
"
,
ret
);
ret
=
CompareStringW
(
CP_ACP
,
0
,
A_NULL_BC
,
4
,
A_ACUTE_BC
,
4
);
ok
(
ret
==
CSTR_LESS_THAN
,
"expected CSTR_LESS_THAN, got %d
\n
"
,
ret
);
...
...
libs/port/sortkey.c
View file @
4a6e69ad
...
...
@@ -245,22 +245,38 @@ static inline int compare_weights(int flags, const WCHAR *str1, int len1,
}
ce1
=
get_weight
(
dstr1
[
dpos1
],
type
);
if
(
!
ce1
)
{
inc_str_pos
(
&
str1
,
&
len1
,
&
dpos1
,
&
dlen1
);
continue
;
}
ce2
=
get_weight
(
dstr2
[
dpos2
],
type
);
if
(
!
ce2
)
{
inc_str_pos
(
&
str2
,
&
len2
,
&
dpos2
,
&
dlen2
);
continue
;
}
if
(
ce1
-
ce2
)
return
ce1
-
ce2
;
inc_str_pos
(
&
str1
,
&
len1
,
&
dpos1
,
&
dlen1
);
inc_str_pos
(
&
str2
,
&
len2
,
&
dpos2
,
&
dlen2
);
}
while
(
len1
&&
!*
str1
)
while
(
len1
)
{
str1
++
;
len1
--
;
if
(
!
dlen1
)
dlen1
=
wine_decompose
(
0
,
*
str1
,
dstr1
,
4
);
ce1
=
get_weight
(
dstr1
[
dpos1
],
type
);
if
(
ce1
)
break
;
inc_str_pos
(
&
str1
,
&
len1
,
&
dpos1
,
&
dlen1
);
}
while
(
len2
&&
!*
str2
)
while
(
len2
)
{
str2
++
;
len2
--
;
if
(
!
dlen2
)
dlen2
=
wine_decompose
(
0
,
*
str2
,
dstr2
,
4
);
ce2
=
get_weight
(
dstr2
[
dpos2
],
type
);
if
(
ce2
)
break
;
inc_str_pos
(
&
str2
,
&
len2
,
&
dpos2
,
&
dlen2
);
}
return
len1
-
len2
;
}
...
...
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