diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index af0008263b4..64765715f2a 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -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 diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index a80cc6e9adc..c8c99f1da9e 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -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 diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index d8f361fd59d..cd83405b767 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -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 diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 7916839ea68..6d19a3d9181 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -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 diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index edef6156859..89d9028e102 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -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 diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c index eb268dc0b67..511a81437dc 100644 --- a/dlls/msvcrt/wcs.c +++ b/dlls/msvcrt/wcs.c @@ -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.@) */