mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against 303f8042f9db508adaca02ef21f8de4992cb9c03.
This commit is contained in:
parent
2a411514e5
commit
f0d1a4a5ba
@ -1,4 +1,4 @@
|
||||
From 4b39a274dd286b963fc34048ea131ae1cf4dc71c Mon Sep 17 00:00:00 2001
|
||||
From 11619cf1483a96e329f640a0abcc571857a87a73 Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Maurer <dark.shadow4@web.de>
|
||||
Date: Sun, 6 Dec 2020 20:57:16 +0100
|
||||
Subject: [PATCH] kernelbase: Implement CompareString functions
|
||||
@ -9,10 +9,10 @@ Subject: [PATCH] kernelbase: Implement CompareString functions
|
||||
2 files changed, 149 insertions(+), 145 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c
|
||||
index 0ec859363db..59929756dc6 100644
|
||||
index 08723c4b865..23054727ad7 100644
|
||||
--- a/dlls/kernel32/tests/locale.c
|
||||
+++ b/dlls/kernel32/tests/locale.c
|
||||
@@ -1831,16 +1831,16 @@ static void test_CompareStringA(void)
|
||||
@@ -1894,16 +1894,16 @@ static void test_CompareStringA(void)
|
||||
"a\\0b vs a expected CSTR_EQUAL or CSTR_GREATER_THAN, got %d\n", ret);
|
||||
|
||||
ret = CompareStringA(lcid, 0, "\2", 2, "\1", 2);
|
||||
@ -33,34 +33,34 @@ index 0ec859363db..59929756dc6 100644
|
||||
|
||||
lcid = MAKELCID(MAKELANGID(LANG_POLISH, SUBLANG_DEFAULT), SORT_DEFAULT);
|
||||
|
||||
@@ -1926,9 +1926,9 @@ static void test_CompareStringW(void)
|
||||
@@ -1989,9 +1989,9 @@ static void test_CompareStringW(void)
|
||||
ok(ret == CSTR_EQUAL, "expected CSTR_EQUAL, got %d\n", ret);
|
||||
|
||||
ret = CompareStringW(CP_ACP, NORM_IGNORENONSPACE, ABC_EE, 3, A_ACUTE_BC, 4);
|
||||
ret = CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORENONSPACE, ABC_EE, 3, A_ACUTE_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, NORM_IGNORENONSPACE, ABC_EE, 4, A_ACUTE_BC_DECOMP, 5);
|
||||
ret = CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORENONSPACE, ABC_EE, 4, A_ACUTE_BC_DECOMP, 5);
|
||||
- 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, NORM_IGNORENONSPACE, A_ACUTE_BC, 4, A_ACUTE_BC_DECOMP, 5);
|
||||
ret = CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORENONSPACE, A_ACUTE_BC, 4, A_ACUTE_BC_DECOMP, 5);
|
||||
ok(ret == CSTR_EQUAL, "expected CSTR_EQUAL, got %d\n", ret);
|
||||
|
||||
@@ -1940,12 +1940,12 @@ static void test_CompareStringW(void)
|
||||
ret = CompareStringW(CP_ACP, 0, A_NULL_BC, 4, A_ACUTE_BC, 4);
|
||||
@@ -2003,12 +2003,12 @@ static void test_CompareStringW(void)
|
||||
ret = CompareStringW(LOCALE_USER_DEFAULT, 0, A_NULL_BC, 4, A_ACUTE_BC, 4);
|
||||
ok(ret == CSTR_LESS_THAN, "expected CSTR_LESS_THAN, got %d\n", ret);
|
||||
ret = CompareStringW(CP_ACP, NORM_IGNORENONSPACE, A_NULL_BC, 4, A_ACUTE_BC, 4);
|
||||
ret = CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORENONSPACE, A_NULL_BC, 4, A_ACUTE_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_DECOMP, 5);
|
||||
ret = CompareStringW(LOCALE_USER_DEFAULT, 0, A_NULL_BC, 4, A_ACUTE_BC_DECOMP, 5);
|
||||
ok(ret == CSTR_LESS_THAN, "expected CSTR_LESS_THAN, got %d\n", ret);
|
||||
ret = CompareStringW(CP_ACP, NORM_IGNORENONSPACE, A_NULL_BC, 4, A_ACUTE_BC_DECOMP, 5);
|
||||
ret = CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORENONSPACE, A_NULL_BC, 4, A_ACUTE_BC_DECOMP, 5);
|
||||
- todo_wine ok(ret == CSTR_EQUAL, "expected CSTR_EQUAL, got %d\n", ret);
|
||||
+ ok(ret == CSTR_EQUAL, "expected CSTR_EQUAL, got %d\n", ret);
|
||||
}
|
||||
|
||||
struct comparestringex_test {
|
||||
@@ -1982,7 +1982,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
@@ -2045,7 +2045,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
},
|
||||
{ /* 5 */
|
||||
"tr-TR", 0,
|
||||
@ -69,7 +69,7 @@ index 0ec859363db..59929756dc6 100644
|
||||
},
|
||||
/* with NORM_IGNORECASE */
|
||||
{ /* 6 */
|
||||
@@ -2007,7 +2007,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
@@ -2070,7 +2070,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
},
|
||||
{ /* 11 */
|
||||
"tr-TR", NORM_IGNORECASE,
|
||||
@ -78,7 +78,7 @@ index 0ec859363db..59929756dc6 100644
|
||||
},
|
||||
/* with NORM_LINGUISTIC_CASING */
|
||||
{ /* 12 */
|
||||
@@ -2032,7 +2032,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
@@ -2095,7 +2095,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
},
|
||||
{ /* 17 */
|
||||
"tr-TR", NORM_LINGUISTIC_CASING,
|
||||
@ -87,7 +87,7 @@ index 0ec859363db..59929756dc6 100644
|
||||
},
|
||||
/* with LINGUISTIC_IGNORECASE */
|
||||
{ /* 18 */
|
||||
@@ -2057,7 +2057,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
@@ -2120,7 +2120,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
},
|
||||
{ /* 23 */
|
||||
"tr-TR", LINGUISTIC_IGNORECASE,
|
||||
@ -96,7 +96,7 @@ index 0ec859363db..59929756dc6 100644
|
||||
},
|
||||
/* with NORM_LINGUISTIC_CASING | NORM_IGNORECASE */
|
||||
{ /* 24 */
|
||||
@@ -2082,7 +2082,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
@@ -2145,7 +2145,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
},
|
||||
{ /* 29 */
|
||||
"tr-TR", NORM_LINGUISTIC_CASING | NORM_IGNORECASE,
|
||||
@ -105,7 +105,7 @@ index 0ec859363db..59929756dc6 100644
|
||||
},
|
||||
/* with NORM_LINGUISTIC_CASING | LINGUISTIC_IGNORECASE */
|
||||
{ /* 30 */
|
||||
@@ -2107,7 +2107,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
@@ -2170,7 +2170,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
},
|
||||
{ /* 35 */
|
||||
"tr-TR", NORM_LINGUISTIC_CASING | LINGUISTIC_IGNORECASE,
|
||||
@ -114,7 +114,7 @@ index 0ec859363db..59929756dc6 100644
|
||||
}
|
||||
};
|
||||
|
||||
@@ -3372,6 +3372,9 @@ static const struct sorting_test_entry unicode_sorting_tests[] =
|
||||
@@ -3540,6 +3540,9 @@ static const struct sorting_test_entry unicode_sorting_tests[] =
|
||||
{ L"en-US", CSTR_LESS_THAN, CSTR_LESS_THAN, 0, L"\x00dc", L"\x1ee9" },
|
||||
{ L"en-US", CSTR_LESS_THAN, CSTR_LESS_THAN, 0, L"\x00fc", L"\x1ee6" },
|
||||
{ L"en-US", CSTR_GREATER_THAN, CSTR_GREATER_THAN, 0, L"\x0152", L"\x00d6" },
|
||||
@ -124,7 +124,7 @@ index 0ec859363db..59929756dc6 100644
|
||||
};
|
||||
|
||||
static void test_unicode_sorting(void)
|
||||
@@ -6260,7 +6263,7 @@ static void test_FindNLSStringEx(void)
|
||||
@@ -6537,7 +6540,7 @@ static void test_FindNLSStringEx(void)
|
||||
{ localeW, FIND_FROMSTART, comb_s_accent1W, ARRAY_SIZE(comb_s_accent1W)-1,
|
||||
comb_s_accent2W, ARRAY_SIZE(comb_s_accent2W)-1, 0, 0, 6, 1, TRUE },
|
||||
{ localeW, FIND_FROMSTART, comb_q_accent1W, ARRAY_SIZE(comb_q_accent1W)-1,
|
||||
@ -134,10 +134,10 @@ index 0ec859363db..59929756dc6 100644
|
||||
};
|
||||
struct test_data *ptest;
|
||||
diff --git a/dlls/kernelbase/locale.c b/dlls/kernelbase/locale.c
|
||||
index d1d461c84e9..28a69c53144 100644
|
||||
index bc0e3b878c3..6ec5a0fad41 100644
|
||||
--- a/dlls/kernelbase/locale.c
|
||||
+++ b/dlls/kernelbase/locale.c
|
||||
@@ -3064,126 +3064,6 @@ static int map_to_halfwidth( WCHAR c, WCHAR *dst, int dstlen )
|
||||
@@ -3156,126 +3156,6 @@ static int map_to_halfwidth( WCHAR c, WCHAR *dst, int dstlen )
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -264,7 +264,7 @@ index d1d461c84e9..28a69c53144 100644
|
||||
enum sortkey_special_script
|
||||
{
|
||||
SORTKEY_UNSORTABLE = 0,
|
||||
@@ -3221,6 +3101,7 @@ struct sortkey_data
|
||||
@@ -3313,6 +3193,7 @@ struct sortkey_data
|
||||
BYTE *buffer;
|
||||
int buffer_pos;
|
||||
int buffer_len;
|
||||
@ -272,7 +272,7 @@ index d1d461c84e9..28a69c53144 100644
|
||||
};
|
||||
|
||||
static DWORD sortkey_get_exception(WCHAR ch, const struct sortguid *locale)
|
||||
@@ -3432,7 +3313,10 @@ static void sortkey_add_diacritic_weights(struct sortkey_data *data, int flags,
|
||||
@@ -3524,7 +3405,10 @@ static void sortkey_add_diacritic_weights(struct sortkey_data *data, int flags,
|
||||
if (old_pos >= diacritic_start_pos)
|
||||
{
|
||||
if (old_pos < data->buffer_len)
|
||||
@ -283,7 +283,7 @@ index d1d461c84e9..28a69c53144 100644
|
||||
}
|
||||
else
|
||||
sortkey_add_diacritic_weight(data, info.weight_diacritic, last_weighted_pos);
|
||||
@@ -3641,6 +3525,7 @@ static int sortkey_generate(int flags, const WCHAR *locale_name, const WCHAR *st
|
||||
@@ -3733,6 +3617,7 @@ static int sortkey_generate(int flags, const WCHAR *locale_name, const WCHAR *st
|
||||
data.buffer = buffer;
|
||||
data.buffer_pos = 0;
|
||||
data.buffer_len = buffer ? buffer_len : 0;
|
||||
@ -291,7 +291,7 @@ index d1d461c84e9..28a69c53144 100644
|
||||
|
||||
if (str_len == -1)
|
||||
str_len = wcslen(str);
|
||||
@@ -3690,6 +3575,130 @@ static int sortkey_generate(int flags, const WCHAR *locale_name, const WCHAR *st
|
||||
@@ -3782,6 +3667,130 @@ static int sortkey_generate(int flags, const WCHAR *locale_name, const WCHAR *st
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -422,7 +422,7 @@ index d1d461c84e9..28a69c53144 100644
|
||||
static int compare_tzdate( const TIME_FIELDS *tf, const SYSTEMTIME *compare )
|
||||
{
|
||||
static const int month_lengths[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
|
||||
@@ -4166,16 +4175,8 @@ INT WINAPI CompareStringEx( const WCHAR *locale, DWORD flags, const WCHAR *str1,
|
||||
@@ -4317,16 +4326,8 @@ INT WINAPI CompareStringEx( const WCHAR *locale, DWORD flags, const WCHAR *str1,
|
||||
if (len1 < 0) len1 = lstrlenW(str1);
|
||||
if (len2 < 0) len2 = lstrlenW(str2);
|
||||
|
||||
|
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "230e953e31f7228d10c8b0a0d2e8cf4f9af9a231"
|
||||
echo "303f8042f9db508adaca02ef21f8de4992cb9c03"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
|
@ -1 +1 @@
|
||||
230e953e31f7228d10c8b0a0d2e8cf4f9af9a231
|
||||
303f8042f9db508adaca02ef21f8de4992cb9c03
|
||||
|
Loading…
Reference in New Issue
Block a user