From d67e04232b4fff7228a9cdf26fad8f3c28ff1654 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 18 Dec 2014 22:42:38 +0000 Subject: =?UTF-8?q?swit=D1=81h=20from=20runtime=20functions=20to=20Windows?= =?UTF-8?q?=20ones,=20to=20compare=20strings=20regardless=20of=20current?= =?UTF-8?q?=20locale?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.miranda-ng.org/main/trunk@11517 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/mir_core/utils.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mir_core/utils.cpp b/src/mir_core/utils.cpp index 10348a28f1..3d7f526423 100644 --- a/src/mir_core/utils.cpp +++ b/src/mir_core/utils.cpp @@ -380,7 +380,7 @@ MIR_CORE_DLL(int) mir_strcmp(const char *p1, const char *p2) return (p2 == NULL) ? 0 : -1; if (p2 == NULL) return 1; - return strcmp(p1, p2); + return CompareStringA(LOCALE_USER_DEFAULT, 0, p1, -1, p2, -1); } MIR_CORE_DLL(int) mir_wstrcmp(const wchar_t *p1, const wchar_t *p2) @@ -389,7 +389,7 @@ MIR_CORE_DLL(int) mir_wstrcmp(const wchar_t *p1, const wchar_t *p2) return (p2 == NULL) ? 0 : -1; if (p2 == NULL) return 1; - return wcscmp(p1, p2); + return CompareStringW(LOCALE_USER_DEFAULT, 0, p1, -1, p2, -1); } MIR_CORE_DLL(int) mir_strcmpi(const char *p1, const char *p2) @@ -398,7 +398,7 @@ MIR_CORE_DLL(int) mir_strcmpi(const char *p1, const char *p2) return (p2 == NULL) ? 0 : -1; if (p2 == NULL) return 1; - return stricmp(p1, p2); + return CompareStringA(LOCALE_USER_DEFAULT, NORM_IGNORECASE, p1, -1, p2, -1); } MIR_CORE_DLL(int) mir_wstrcmpi(const wchar_t *p1, const wchar_t *p2) @@ -407,5 +407,5 @@ MIR_CORE_DLL(int) mir_wstrcmpi(const wchar_t *p1, const wchar_t *p2) return (p2 == NULL) ? 0 : -1; if (p2 == NULL) return 1; - return wcsicmp(p1, p2); + return CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE, p1, -1, p2, -1); } -- cgit v1.2.3