mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
51 lines
2.1 KiB
Diff
51 lines
2.1 KiB
Diff
|
From 33fa174b6404cfea673d510457d21d784a23efbd Mon Sep 17 00:00:00 2001
|
||
|
From: Sebastian Lackner <sebastian@fds-team.de>
|
||
|
Date: Sun, 4 May 2014 00:18:11 +0200
|
||
|
Subject: kernel32: Silence repeated CompareStringEx FIXME.
|
||
|
|
||
|
---
|
||
|
dlls/kernel32/locale.c | 14 +++++++++-----
|
||
|
1 file changed, 9 insertions(+), 5 deletions(-)
|
||
|
|
||
|
diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c
|
||
|
index eca0e39..55ef3d6 100644
|
||
|
--- a/dlls/kernel32/locale.c
|
||
|
+++ b/dlls/kernel32/locale.c
|
||
|
@@ -2985,9 +2985,10 @@ INT WINAPI CompareStringW(LCID lcid, DWORD flags,
|
||
|
INT WINAPI CompareStringEx(LPCWSTR locale, DWORD flags, LPCWSTR str1, INT len1,
|
||
|
LPCWSTR str2, INT len2, LPNLSVERSIONINFO version, LPVOID reserved, LPARAM lParam)
|
||
|
{
|
||
|
- DWORD supported_flags = NORM_IGNORECASE|NORM_IGNORENONSPACE|NORM_IGNORESYMBOLS|SORT_STRINGSORT
|
||
|
- |NORM_IGNOREKANATYPE|NORM_IGNOREWIDTH|LOCALE_USE_CP_ACP;
|
||
|
- DWORD semistub_flags = NORM_LINGUISTIC_CASING|LINGUISTIC_IGNORECASE|0x10000000;
|
||
|
+ static const DWORD supported_flags = NORM_IGNORECASE|NORM_IGNORENONSPACE|NORM_IGNORESYMBOLS|SORT_STRINGSORT
|
||
|
+ |NORM_IGNOREKANATYPE|NORM_IGNOREWIDTH|LOCALE_USE_CP_ACP
|
||
|
+ |NORM_LINGUISTIC_CASING|LINGUISTIC_IGNORECASE|0x10000000;
|
||
|
+ static DWORD semistub_flags = NORM_LINGUISTIC_CASING|LINGUISTIC_IGNORECASE|0x10000000;
|
||
|
/* 0x10000000 is related to diacritics in Arabic, Japanese, and Hebrew */
|
||
|
INT ret;
|
||
|
|
||
|
@@ -3001,14 +3002,17 @@ INT WINAPI CompareStringEx(LPCWSTR locale, DWORD flags, LPCWSTR str1, INT len1,
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
- if (flags & ~(supported_flags|semistub_flags))
|
||
|
+ if (flags & ~supported_flags)
|
||
|
{
|
||
|
SetLastError(ERROR_INVALID_FLAGS);
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
if (flags & semistub_flags)
|
||
|
- FIXME("semi-stub behavor for flag(s) 0x%x\n", flags & semistub_flags);
|
||
|
+ {
|
||
|
+ FIXME("semi-stub behavior for flag(s) 0x%x\n", flags & semistub_flags);
|
||
|
+ semistub_flags &= ~flags;
|
||
|
+ }
|
||
|
|
||
|
if (len1 < 0) len1 = strlenW(str1);
|
||
|
if (len2 < 0) len2 = strlenW(str2);
|
||
|
--
|
||
|
1.7.9.5
|
||
|
|