Author: akhaldi
Date: Wed Aug 17 15:35:42 2016
New Revision: 72241
URL:
http://svn.reactos.org/svn/reactos?rev=72241&view=rev
Log:
[KERNEL32] Sync sortkey.c with Wine Staging 1.9.16. CORE-10771 CORE-11866
Modified:
trunk/reactos/dll/win32/kernel32/winnls/string/sortkey.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/kernel32/winnls/string/sortkey.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/winnls/string/sortkey.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/winnls/string/sortkey.c [iso-8859-1] Wed Aug 17
15:35:42 2016
@@ -20,8 +20,10 @@
#include <wine/unicode.h>
+#ifdef __REACTOS__
#define get_char_typeW(x) iswctype((x) >> 8, (x) & 0xFF)
-extern int get_decomposition(WCHAR src, WCHAR *dst, unsigned int dstlen);
+#endif
+extern unsigned int wine_decompose( WCHAR ch, WCHAR *dst, unsigned int dstlen );
extern const unsigned int collation_table[];
/*
@@ -40,11 +42,10 @@
key_len[0] = key_len[1] = key_len[2] = key_len[3] = 0;
for (; srclen; srclen--, src++)
{
- int decomposed_len = 1;/*get_decomposition(*src, dummy, 4);*/
+ unsigned int i, decomposed_len = 1;/*wine_decompose(*src, dummy, 4);*/
dummy[0] = *src;
if (decomposed_len)
{
- int i;
for (i = 0; i < decomposed_len; i++)
{
WCHAR wch = dummy[i];
@@ -98,11 +99,10 @@
for (; srclen; srclen--, src++)
{
- int decomposed_len = 1;/*get_decomposition(*src, dummy, 4);*/
+ unsigned int i, decomposed_len = 1;/*wine_decompose(*src, dummy, 4);*/
dummy[0] = *src;
if (decomposed_len)
{
- int i;
for (i = 0; i < decomposed_len; i++)
{
WCHAR wch = dummy[i];
@@ -225,8 +225,16 @@
len1--;
len2--;
}
- if (len1 && !*str1) len1--;
- if (len2 && !*str2) len2--;
+ while (len1 && !*str1)
+ {
+ str1++;
+ len1--;
+ }
+ while (len2 && !*str2)
+ {
+ str2++;
+ len2--;
+ }
return len1 - len2;
}
@@ -276,8 +284,16 @@
len1--;
len2--;
}
- if (len1 && !*str1) len1--;
- if (len2 && !*str2) len2--;
+ while (len1 && !*str1)
+ {
+ str1++;
+ len1--;
+ }
+ while (len2 && !*str2)
+ {
+ str2++;
+ len2--;
+ }
return len1 - len2;
}
@@ -327,8 +343,16 @@
len1--;
len2--;
}
- if (len1 && !*str1) len1--;
- if (len2 && !*str2) len2--;
+ while (len1 && !*str1)
+ {
+ str1++;
+ len1--;
+ }
+ while (len2 && !*str2)
+ {
+ str2++;
+ len2--;
+ }
return len1 - len2;
}
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Wed Aug 17 15:35:42 2016
@@ -283,7 +283,7 @@
reactos/dll/win32/kernel32/winnls/string/lang.c # Synced in r52754
reactos/dll/win32/kernel32/winnls/string/lcformat.c # Synced to WineStaging-1.7.55
reactos/dll/win32/kernel32/winnls/string/nls.c # Synced in r52754
- reactos/dll/win32/kernel32/winnls/string/sortkey.c # Synced to WineStaging-1.7.55
+ reactos/dll/win32/kernel32/winnls/string/sortkey.c # Synced to WineStaging-1.9.16
msvcrt -
reactos/lib/sdk/crt/except/cpp.c # Synced at 20080528