msvcrt: Added _wcsncoll and _wcsncoll_l implementation.

This commit is contained in:
Jactry Zeng 2013-03-29 17:12:53 +08:00 committed by Alexandre Julliard
parent 95daa45dbc
commit 2f425fb832
6 changed files with 30 additions and 6 deletions

View file

@ -1491,7 +1491,7 @@
@ cdecl _wcslwr_s(wstr long) msvcrt._wcslwr_s
@ stub _wcslwr_s_l
@ cdecl _wcsncoll(wstr wstr long) msvcrt._wcsncoll
@ stub _wcsncoll_l
@ cdecl _wcsncoll_l(wstr wstr long ptr) msvcrt._wcsncoll_l
@ cdecl _wcsnicmp(wstr wstr long) msvcrt._wcsnicmp
@ stub _wcsnicmp_l
@ cdecl _wcsnicoll(wstr wstr long) msvcrt._wcsnicoll

View file

@ -1854,7 +1854,7 @@
@ cdecl _wcslwr_s(wstr long) msvcrt._wcslwr_s
@ stub _wcslwr_s_l
@ cdecl _wcsncoll(wstr wstr long) msvcrt._wcsncoll
@ stub _wcsncoll_l
@ cdecl _wcsncoll_l(wstr wstr long ptr) msvcrt._wcsncoll_l
@ cdecl _wcsnicmp(wstr wstr long) msvcrt._wcsnicmp
@ stub _wcsnicmp_l
@ cdecl _wcsnicoll(wstr wstr long) msvcrt._wcsnicoll

View file

@ -1151,7 +1151,7 @@
@ cdecl _wcslwr_s(wstr long) msvcrt._wcslwr_s
@ stub _wcslwr_s_l
@ cdecl _wcsncoll(wstr wstr long) msvcrt._wcsncoll
@ stub _wcsncoll_l
@ cdecl _wcsncoll_l(wstr wstr long ptr) msvcrt._wcsncoll_l
@ cdecl _wcsnicmp(wstr wstr long) msvcrt._wcsnicmp
@ stub _wcsnicmp_l
@ cdecl _wcsnicoll(wstr wstr long) msvcrt._wcsnicoll

View file

@ -1145,7 +1145,7 @@
@ cdecl _wcslwr_s(wstr long) msvcrt._wcslwr_s
@ stub _wcslwr_s_l
@ cdecl _wcsncoll(wstr wstr long) msvcrt._wcsncoll
@ stub _wcsncoll_l
@ cdecl _wcsncoll_l(wstr wstr long ptr) msvcrt._wcsncoll_l
@ cdecl _wcsnicmp(wstr wstr long) msvcrt._wcsnicmp
@ stub _wcsnicmp_l
@ cdecl _wcsnicoll(wstr wstr long) msvcrt._wcsnicoll

View file

@ -1109,8 +1109,8 @@
# stub _wcslwr_l(wstr ptr)
@ cdecl _wcslwr_s(wstr long) MSVCRT__wcslwr_s
# stub _wcslwr_s_l(wstr long ptr)
@ stub _wcsncoll(wstr wstr long)
# stub _wcsncoll_l(wstr wstr long ptr)
@ cdecl _wcsncoll(wstr wstr long) MSVCRT__wcsncoll
@ cdecl _wcsncoll_l(wstr wstr long ptr) MSVCRT__wcsncoll_l
@ cdecl _wcsnicmp(wstr wstr long) ntdll._wcsnicmp
# stub _wcsnicmp_l(wstr wstr long ptr)
@ cdecl _wcsnicoll(wstr wstr long) MSVCRT__wcsnicoll

View file

@ -198,6 +198,30 @@ int CDECL MSVCRT__wcslwr_s( MSVCRT_wchar_t* str, MSVCRT_size_t n )
return MSVCRT_EINVAL;
}
/*********************************************************************
* _wcsncoll_l (MSVCRT.@)
*/
int CDECL MSVCRT__wcsncoll_l(const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2,
MSVCRT_size_t count, MSVCRT__locale_t locale)
{
MSVCRT_pthreadlocinfo locinfo;
if(!locale)
locinfo = get_locinfo();
else
locinfo = locale->locinfo;
return CompareStringW(locinfo->lc_handle[MSVCRT_LC_COLLATE], 0, str1, count, str2, count)-CSTR_EQUAL;
}
/*********************************************************************
* _wcsncoll (MSVCRT.@)
*/
int CDECL MSVCRT__wcsncoll(const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2, MSVCRT_size_t count)
{
return MSVCRT__wcsncoll_l(str1, str2, count, NULL);
}
/*********************************************************************
* _wcstod_l (MSVCRT.@)
*/