You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Rebase against 9107f591d3d73a3b4040db2e13ef51d9846591c9.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
From 2886829edafa6bf3fe64b15d092a380fd53e9ad4 Mon Sep 17 00:00:00 2001
|
||||
From 798934ff91c9ed7b445af4b8c7e6442fede713fb Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Maurer <dark.shadow4@web.de>
|
||||
Date: Fri, 10 Apr 2020 18:47:18 +0200
|
||||
Subject: [PATCH] kernelbase: Implement sortkey generation on official tables
|
||||
@ -10,10 +10,10 @@ Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
|
||||
2 files changed, 413 insertions(+), 123 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c
|
||||
index 3fdfa251144..d875bf94f92 100644
|
||||
index 42e14eb736f..29cfe95a47b 100644
|
||||
--- a/dlls/kernel32/tests/locale.c
|
||||
+++ b/dlls/kernel32/tests/locale.c
|
||||
@@ -2687,6 +2687,13 @@ static void test_lcmapstring_unicode(lcmapstring_wrapper func_ptr, const char *f
|
||||
@@ -2692,6 +2692,13 @@ static void test_lcmapstring_unicode(lcmapstring_wrapper func_ptr, const char *f
|
||||
lstrlenW(symbols_stripped) + 1, ret);
|
||||
ok(!lstrcmpW(buf, symbols_stripped), "%s string comparison mismatch\n", func_name);
|
||||
|
||||
@ -163,17 +163,17 @@ index 3fdfa251144..d875bf94f92 100644
|
||||
static void test_FoldStringA(void)
|
||||
{
|
||||
int ret, i, j;
|
||||
@@ -6967,4 +7103,5 @@ START_TEST(locale)
|
||||
test_NLSVersion();
|
||||
@@ -7180,4 +7316,5 @@ START_TEST(locale)
|
||||
test_geo_name();
|
||||
/* this requires collation table patch to make it MS compatible */
|
||||
if (0) test_sorting();
|
||||
+ test_unicode_sorting();
|
||||
}
|
||||
diff --git a/dlls/kernelbase/locale.c b/dlls/kernelbase/locale.c
|
||||
index c60b796aa48..3a29f3e8250 100644
|
||||
index 24e8cd3f338..0e40db40f72 100644
|
||||
--- a/dlls/kernelbase/locale.c
|
||||
+++ b/dlls/kernelbase/locale.c
|
||||
@@ -2128,127 +2128,6 @@ static int wcstombs_codepage( UINT codepage, DWORD flags, const WCHAR *src, int
|
||||
@@ -2161,127 +2161,6 @@ static int wcstombs_codepage( UINT codepage, DWORD flags, const WCHAR *src, int
|
||||
return wcstombs_sbcs( info, src, srclen, dst, dstlen );
|
||||
}
|
||||
|
||||
@ -301,7 +301,7 @@ index c60b796aa48..3a29f3e8250 100644
|
||||
/* compose a full-width katakana. return consumed source characters. */
|
||||
static int compose_katakana( const WCHAR *src, int srclen, WCHAR *dst )
|
||||
{
|
||||
@@ -2576,6 +2455,280 @@ static int compare_weights(int flags, const WCHAR *str1, int len1,
|
||||
@@ -2609,6 +2488,280 @@ static int compare_weights(int flags, const WCHAR *str1, int len1,
|
||||
return len1 - len2;
|
||||
}
|
||||
|
||||
@ -582,7 +582,7 @@ index c60b796aa48..3a29f3e8250 100644
|
||||
|
||||
static const struct geoinfo *get_geoinfo_ptr( GEOID geoid )
|
||||
{
|
||||
@@ -5257,8 +5410,8 @@ INT WINAPI DECLSPEC_HOTPATCH LCMapStringEx( const WCHAR *locale, DWORD flags, co
|
||||
@@ -5292,8 +5445,8 @@ INT WINAPI DECLSPEC_HOTPATCH LCMapStringEx( const WCHAR *locale, DWORD flags, co
|
||||
TRACE( "(%s,0x%08x,%s,%d,%p,%d)\n",
|
||||
debugstr_w(locale), flags, debugstr_wn(src, srclen), srclen, dst, dstlen );
|
||||
|
||||
@ -594,5 +594,5 @@ index c60b796aa48..3a29f3e8250 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.29.2
|
||||
2.30.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 4c9ae78eef8d1fc6f1bdc1c23d18719865d1cff8 Mon Sep 17 00:00:00 2001
|
||||
From adcb17116397f81a1ffec30badc6c02317033821 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, 175 insertions(+), 146 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c
|
||||
index e4a31c120f0..e04c85fb45c 100644
|
||||
index 276422801cb..51c6d91c0b5 100644
|
||||
--- a/dlls/kernel32/tests/locale.c
|
||||
+++ b/dlls/kernel32/tests/locale.c
|
||||
@@ -1955,16 +1955,16 @@ static void test_CompareStringA(void)
|
||||
@@ -1960,16 +1960,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,7 +33,7 @@ index e4a31c120f0..e04c85fb45c 100644
|
||||
|
||||
lcid = MAKELCID(MAKELANGID(LANG_POLISH, SUBLANG_DEFAULT), SORT_DEFAULT);
|
||||
|
||||
@@ -2045,9 +2045,9 @@ static void test_CompareStringW(void)
|
||||
@@ -2050,9 +2050,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);
|
||||
@ -45,7 +45,7 @@ index e4a31c120f0..e04c85fb45c 100644
|
||||
ret = CompareStringW(CP_ACP, NORM_IGNORENONSPACE, A_ACUTE_BC, 4, A_ACUTE_BC_DECOMP, 5);
|
||||
ok(ret == CSTR_EQUAL, "expected CSTR_EQUAL, got %d\n", ret);
|
||||
|
||||
@@ -2059,12 +2059,12 @@ static void test_CompareStringW(void)
|
||||
@@ -2064,12 +2064,12 @@ static void test_CompareStringW(void)
|
||||
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);
|
||||
ret = CompareStringW(CP_ACP, NORM_IGNORENONSPACE, A_NULL_BC, 4, A_ACUTE_BC, 4);
|
||||
@ -60,7 +60,7 @@ index e4a31c120f0..e04c85fb45c 100644
|
||||
}
|
||||
|
||||
struct comparestringex_test {
|
||||
@@ -2101,7 +2101,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
@@ -2106,7 +2106,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
},
|
||||
{ /* 5 */
|
||||
"tr-TR", 0,
|
||||
@ -69,7 +69,7 @@ index e4a31c120f0..e04c85fb45c 100644
|
||||
},
|
||||
/* with NORM_IGNORECASE */
|
||||
{ /* 6 */
|
||||
@@ -2126,7 +2126,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
@@ -2131,7 +2131,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
},
|
||||
{ /* 11 */
|
||||
"tr-TR", NORM_IGNORECASE,
|
||||
@ -78,7 +78,7 @@ index e4a31c120f0..e04c85fb45c 100644
|
||||
},
|
||||
/* with NORM_LINGUISTIC_CASING */
|
||||
{ /* 12 */
|
||||
@@ -2151,7 +2151,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
@@ -2156,7 +2156,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
},
|
||||
{ /* 17 */
|
||||
"tr-TR", NORM_LINGUISTIC_CASING,
|
||||
@ -87,7 +87,7 @@ index e4a31c120f0..e04c85fb45c 100644
|
||||
},
|
||||
/* with LINGUISTIC_IGNORECASE */
|
||||
{ /* 18 */
|
||||
@@ -2176,7 +2176,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
@@ -2181,7 +2181,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
},
|
||||
{ /* 23 */
|
||||
"tr-TR", LINGUISTIC_IGNORECASE,
|
||||
@ -96,7 +96,7 @@ index e4a31c120f0..e04c85fb45c 100644
|
||||
},
|
||||
/* with NORM_LINGUISTIC_CASING | NORM_IGNORECASE */
|
||||
{ /* 24 */
|
||||
@@ -2201,7 +2201,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
@@ -2206,7 +2206,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
},
|
||||
{ /* 29 */
|
||||
"tr-TR", NORM_LINGUISTIC_CASING | NORM_IGNORECASE,
|
||||
@ -105,7 +105,7 @@ index e4a31c120f0..e04c85fb45c 100644
|
||||
},
|
||||
/* with NORM_LINGUISTIC_CASING | LINGUISTIC_IGNORECASE */
|
||||
{ /* 30 */
|
||||
@@ -2226,7 +2226,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
@@ -2231,7 +2231,7 @@ static const struct comparestringex_test comparestringex_tests[] = {
|
||||
},
|
||||
{ /* 35 */
|
||||
"tr-TR", NORM_LINGUISTIC_CASING | LINGUISTIC_IGNORECASE,
|
||||
@ -124,7 +124,7 @@ index e4a31c120f0..e04c85fb45c 100644
|
||||
};
|
||||
|
||||
static void test_unicode_sorting(void)
|
||||
@@ -6123,7 +6126,7 @@ static void test_FindNLSStringEx(void)
|
||||
@@ -6126,7 +6129,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,
|
||||
@ -133,19 +133,19 @@ index e4a31c120f0..e04c85fb45c 100644
|
||||
{ 0 }
|
||||
};
|
||||
struct test_data *ptest;
|
||||
@@ -7277,6 +7280,6 @@ START_TEST(locale)
|
||||
test_SpecialCasing();
|
||||
@@ -7490,6 +7493,6 @@ START_TEST(locale)
|
||||
test_NLSVersion();
|
||||
test_geo_name();
|
||||
/* this requires collation table patch to make it MS compatible */
|
||||
- if (0) test_sorting();
|
||||
+ test_sorting();
|
||||
test_unicode_sorting();
|
||||
}
|
||||
diff --git a/dlls/kernelbase/locale.c b/dlls/kernelbase/locale.c
|
||||
index ef135e48c2f..21a823063f3 100644
|
||||
index f651d7dc384..abcafbfa586 100644
|
||||
--- a/dlls/kernelbase/locale.c
|
||||
+++ b/dlls/kernelbase/locale.c
|
||||
@@ -2335,126 +2335,6 @@ static int map_to_halfwidth( WCHAR c, WCHAR *dst, int dstlen )
|
||||
@@ -2368,126 +2368,6 @@ static int map_to_halfwidth( WCHAR c, WCHAR *dst, int dstlen )
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -272,7 +272,7 @@ index ef135e48c2f..21a823063f3 100644
|
||||
enum sortkey_special_script
|
||||
{
|
||||
SORTKEY_UNSORTABLE = 0,
|
||||
@@ -2492,6 +2372,7 @@ struct sortkey_data
|
||||
@@ -2525,6 +2405,7 @@ struct sortkey_data
|
||||
BYTE *buffer;
|
||||
int buffer_pos;
|
||||
int buffer_len;
|
||||
@ -280,7 +280,7 @@ index ef135e48c2f..21a823063f3 100644
|
||||
};
|
||||
|
||||
static DWORD sortkey_get_exception(WCHAR ch, const struct sortguid *locale)
|
||||
@@ -2703,7 +2584,10 @@ static void sortkey_add_diacritic_weights(struct sortkey_data *data, int flags,
|
||||
@@ -2736,7 +2617,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)
|
||||
@ -291,7 +291,7 @@ index ef135e48c2f..21a823063f3 100644
|
||||
}
|
||||
else
|
||||
sortkey_add_diacritic_weight(data, info.weight_diacritic, last_weighted_pos);
|
||||
@@ -2912,6 +2796,7 @@ static int sortkey_generate(int flags, const WCHAR *locale_name, const WCHAR *st
|
||||
@@ -2945,6 +2829,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;
|
||||
@ -299,7 +299,7 @@ index ef135e48c2f..21a823063f3 100644
|
||||
|
||||
if (str_len == -1)
|
||||
str_len = wcslen(str);
|
||||
@@ -2961,6 +2846,155 @@ static int sortkey_generate(int flags, const WCHAR *locale_name, const WCHAR *st
|
||||
@@ -2994,6 +2879,155 @@ static int sortkey_generate(int flags, const WCHAR *locale_name, const WCHAR *st
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -455,7 +455,7 @@ index ef135e48c2f..21a823063f3 100644
|
||||
static const struct geoinfo *get_geoinfo_ptr( GEOID geoid )
|
||||
{
|
||||
int min = 0, max = ARRAY_SIZE( geoinfodata )-1;
|
||||
@@ -3434,16 +3468,8 @@ INT WINAPI CompareStringEx( const WCHAR *locale, DWORD flags, const WCHAR *str1,
|
||||
@@ -3467,16 +3501,8 @@ INT WINAPI CompareStringEx( const WCHAR *locale, DWORD flags, const WCHAR *str1,
|
||||
if (len1 < 0) len1 = lstrlenW(str1);
|
||||
if (len2 < 0) len2 = lstrlenW(str2);
|
||||
|
||||
@ -475,5 +475,5 @@ index ef135e48c2f..21a823063f3 100644
|
||||
|
||||
|
||||
--
|
||||
2.29.2
|
||||
2.30.1
|
||||
|
||||
|
Reference in New Issue
Block a user