mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 12:47:16 +00:00
[KERNEL32] Sync sortkey.c with Wine Staging 1.9.16. CORE-10771 CORE-11866
svn path=/trunk/; revision=72241
This commit is contained in:
parent
b01239eb28
commit
be65077e3f
2 changed files with 36 additions and 12 deletions
|
@ -20,8 +20,10 @@
|
||||||
|
|
||||||
#include <wine/unicode.h>
|
#include <wine/unicode.h>
|
||||||
|
|
||||||
|
#ifdef __REACTOS__
|
||||||
#define get_char_typeW(x) iswctype((x) >> 8, (x) & 0xFF)
|
#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[];
|
extern const unsigned int collation_table[];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -40,11 +42,10 @@ int wine_get_sortkey(int flags, const WCHAR *src, int srclen, char *dst, int dst
|
||||||
key_len[0] = key_len[1] = key_len[2] = key_len[3] = 0;
|
key_len[0] = key_len[1] = key_len[2] = key_len[3] = 0;
|
||||||
for (; srclen; srclen--, src++)
|
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;
|
dummy[0] = *src;
|
||||||
if (decomposed_len)
|
if (decomposed_len)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
for (i = 0; i < decomposed_len; i++)
|
for (i = 0; i < decomposed_len; i++)
|
||||||
{
|
{
|
||||||
WCHAR wch = dummy[i];
|
WCHAR wch = dummy[i];
|
||||||
|
@ -98,11 +99,10 @@ int wine_get_sortkey(int flags, const WCHAR *src, int srclen, char *dst, int dst
|
||||||
|
|
||||||
for (; srclen; srclen--, src++)
|
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;
|
dummy[0] = *src;
|
||||||
if (decomposed_len)
|
if (decomposed_len)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
for (i = 0; i < decomposed_len; i++)
|
for (i = 0; i < decomposed_len; i++)
|
||||||
{
|
{
|
||||||
WCHAR wch = dummy[i];
|
WCHAR wch = dummy[i];
|
||||||
|
@ -225,8 +225,16 @@ static inline int compare_unicode_weights(int flags, const WCHAR *str1, int len1
|
||||||
len1--;
|
len1--;
|
||||||
len2--;
|
len2--;
|
||||||
}
|
}
|
||||||
if (len1 && !*str1) len1--;
|
while (len1 && !*str1)
|
||||||
if (len2 && !*str2) len2--;
|
{
|
||||||
|
str1++;
|
||||||
|
len1--;
|
||||||
|
}
|
||||||
|
while (len2 && !*str2)
|
||||||
|
{
|
||||||
|
str2++;
|
||||||
|
len2--;
|
||||||
|
}
|
||||||
return len1 - len2;
|
return len1 - len2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -276,8 +284,16 @@ static inline int compare_diacritic_weights(int flags, const WCHAR *str1, int le
|
||||||
len1--;
|
len1--;
|
||||||
len2--;
|
len2--;
|
||||||
}
|
}
|
||||||
if (len1 && !*str1) len1--;
|
while (len1 && !*str1)
|
||||||
if (len2 && !*str2) len2--;
|
{
|
||||||
|
str1++;
|
||||||
|
len1--;
|
||||||
|
}
|
||||||
|
while (len2 && !*str2)
|
||||||
|
{
|
||||||
|
str2++;
|
||||||
|
len2--;
|
||||||
|
}
|
||||||
return len1 - len2;
|
return len1 - len2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -327,8 +343,16 @@ static inline int compare_case_weights(int flags, const WCHAR *str1, int len1,
|
||||||
len1--;
|
len1--;
|
||||||
len2--;
|
len2--;
|
||||||
}
|
}
|
||||||
if (len1 && !*str1) len1--;
|
while (len1 && !*str1)
|
||||||
if (len2 && !*str2) len2--;
|
{
|
||||||
|
str1++;
|
||||||
|
len1--;
|
||||||
|
}
|
||||||
|
while (len2 && !*str2)
|
||||||
|
{
|
||||||
|
str2++;
|
||||||
|
len2--;
|
||||||
|
}
|
||||||
return len1 - len2;
|
return len1 - len2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -283,7 +283,7 @@ kernel32 -
|
||||||
reactos/dll/win32/kernel32/winnls/string/lang.c # Synced in r52754
|
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/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/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 -
|
msvcrt -
|
||||||
reactos/lib/sdk/crt/except/cpp.c # Synced at 20080528
|
reactos/lib/sdk/crt/except/cpp.c # Synced at 20080528
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue