msvcrt: Use CompareString in wcscoll functions.

This commit is contained in:
Piotr Caban 2012-12-18 11:57:00 +01:00 committed by Alexandre Julliard
parent 0c91daee8b
commit 1f784a1001
1 changed files with 6 additions and 6 deletions

View File

@ -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 ) INT CDECL MSVCRT__wcsicoll( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2 )
{ {
/* FIXME: handle collates */ return CompareStringW(get_locinfo()->lc_handle[MSVCRT_LC_COLLATE],
return strcmpiW( str1, str2 ); 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 ) INT CDECL MSVCRT__wcsnicoll( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2, MSVCRT_size_t count )
{ {
/* FIXME: handle collates */ return CompareStringW(get_locinfo()->lc_handle[MSVCRT_LC_COLLATE],
return strncmpiW( str1, str2, count ); 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 ) int CDECL MSVCRT_wcscoll( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2 )
{ {
/* FIXME: handle collates */ return CompareStringW(get_locinfo()->lc_handle[MSVCRT_LC_COLLATE],
return strcmpW( str1, str2 ); 0, str1, -1, str2, -1)-CSTR_EQUAL;
} }
/********************************************************************* /*********************************************************************