From 1f784a100125a4511729b3dae110f3893c638c6f Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Tue, 18 Dec 2012 11:57:00 +0100 Subject: [PATCH] msvcrt: Use CompareString in wcscoll functions. --- dlls/msvcrt/wcs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c index e7bf0e45af4..a0b1cb6ce4b 100644 --- a/dlls/msvcrt/wcs.c +++ b/dlls/msvcrt/wcs.c @@ -74,8 +74,8 @@ MSVCRT_wchar_t* CDECL MSVCRT__wcsdup( const MSVCRT_wchar_t* str ) */ INT CDECL MSVCRT__wcsicoll( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2 ) { - /* FIXME: handle collates */ - return strcmpiW( str1, str2 ); + return CompareStringW(get_locinfo()->lc_handle[MSVCRT_LC_COLLATE], + NORM_IGNORECASE, str1, -1, str2, -1)-CSTR_EQUAL; } /********************************************************************* @@ -83,8 +83,8 @@ INT CDECL MSVCRT__wcsicoll( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* st */ INT CDECL MSVCRT__wcsnicoll( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2, MSVCRT_size_t count ) { - /* FIXME: handle collates */ - return strncmpiW( str1, str2, count ); + return CompareStringW(get_locinfo()->lc_handle[MSVCRT_LC_COLLATE], + NORM_IGNORECASE, str1, count, str2, count)-CSTR_EQUAL; } /********************************************************************* @@ -1010,8 +1010,8 @@ int CDECL MSVCRT_swprintf_p_l(MSVCRT_wchar_t *buffer, MSVCRT_size_t length, */ int CDECL MSVCRT_wcscoll( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2 ) { - /* FIXME: handle collates */ - return strcmpW( str1, str2 ); + return CompareStringW(get_locinfo()->lc_handle[MSVCRT_LC_COLLATE], + 0, str1, -1, str2, -1)-CSTR_EQUAL; } /*********************************************************************