From 23906816d87795c363f0199f33ff70f2732c6ab5 Mon Sep 17 00:00:00 2001 From: Mike Gibson Date: Fri, 3 Dec 2010 10:12:23 -0700 Subject: [PATCH] msvcrt: Implement wcsnicoll. --- dlls/msvcr100/msvcr100.spec | 2 +- dlls/msvcr70/msvcr70.spec | 2 +- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/msvcrt.spec | 2 +- dlls/msvcrt/wcs.c | 9 +++++++++ include/msvcrt/string.h | 1 + include/msvcrt/wchar.h | 1 + 8 files changed, 16 insertions(+), 5 deletions(-) diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 1c2c66fa17f..9f2a1476e23 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -1299,7 +1299,7 @@ @ stub _wcsncoll_l @ cdecl _wcsnicmp(wstr wstr long) msvcrt._wcsnicmp @ stub _wcsnicmp_l -@ stub _wcsnicoll +@ cdecl _wcsnicoll(wstr wstr long) msvcrt._wcsnicoll @ stub _wcsnicoll_l @ cdecl _wcsnset(wstr long long) msvcrt._wcsnset @ stub _wcsnset_s diff --git a/dlls/msvcr70/msvcr70.spec b/dlls/msvcr70/msvcr70.spec index 84a65126515..f33a06489c3 100644 --- a/dlls/msvcr70/msvcr70.spec +++ b/dlls/msvcr70/msvcr70.spec @@ -601,7 +601,7 @@ @ cdecl _wcslwr(wstr) msvcrt._wcslwr @ stub _wcsncoll @ cdecl _wcsnicmp(wstr wstr long) msvcrt._wcsnicmp -@ stub _wcsnicoll +@ cdecl _wcsnicoll(wstr wstr long) msvcrt._wcsnicoll @ cdecl _wcsnset(wstr long long) msvcrt._wcsnset @ cdecl _wcsrev(wstr) msvcrt._wcsrev @ cdecl _wcsset(wstr long) msvcrt._wcsset diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index 8ab18352529..1512347ceb3 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -1152,7 +1152,7 @@ @ stub _wcsncoll_l @ cdecl _wcsnicmp(wstr wstr long) msvcrt._wcsnicmp @ stub _wcsnicmp_l -@ stub _wcsnicoll +@ cdecl _wcsnicoll(wstr wstr long) msvcrt._wcsnicoll @ stub _wcsnicoll_l @ cdecl _wcsnset(wstr long long) msvcrt._wcsnset @ stub _wcsnset_s diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index f1a2bde7373..feaf80ef570 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -1139,7 +1139,7 @@ @ stub _wcsncoll_l @ cdecl _wcsnicmp(wstr wstr long) msvcrt._wcsnicmp @ stub _wcsnicmp_l -@ stub _wcsnicoll +@ cdecl _wcsnicoll(wstr wstr long) msvcrt._wcsnicoll @ stub _wcsnicoll_l @ cdecl _wcsnset(wstr long long) msvcrt._wcsnset @ stub _wcsnset_s diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 379b7cdd718..9fe5f648bb7 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -1073,7 +1073,7 @@ # stub _wcsncoll_l @ cdecl _wcsnicmp(wstr wstr long) ntdll._wcsnicmp # stub _wcsnicmp_l -@ stub _wcsnicoll #(wstr wstr long) +@ cdecl _wcsnicoll(wstr wstr long) # stub _wcsnicoll_l @ cdecl _wcsnset(wstr long long) MSVCRT__wcsnset # stub _wcsnset_s diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c index 484679fa45a..b01e60b09fc 100644 --- a/dlls/msvcrt/wcs.c +++ b/dlls/msvcrt/wcs.c @@ -57,6 +57,15 @@ INT CDECL _wcsicoll( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2 ) return strcmpiW( str1, str2 ); } +/********************************************************************* + * _wcsnicoll (MSVCRT.@) + */ +INT CDECL _wcsnicoll( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2, MSVCRT_size_t count ) +{ + /* FIXME: handle collates */ + return strncmpiW( str1, str2, count ); +} + /********************************************************************* * _wcsnset (MSVCRT.@) */ diff --git a/include/msvcrt/string.h b/include/msvcrt/string.h index 24bebd038c2..5c836319ae9 100644 --- a/include/msvcrt/string.h +++ b/include/msvcrt/string.h @@ -88,6 +88,7 @@ int __cdecl _wcsicmp(const wchar_t*,const wchar_t*); int __cdecl _wcsicoll(const wchar_t*,const wchar_t*); wchar_t* __cdecl _wcslwr(wchar_t*); int __cdecl _wcsnicmp(const wchar_t*,const wchar_t*,size_t); +int __cdecl _wcsnicoll(const wchar_t*,const wchar_t*,size_t); wchar_t* __cdecl _wcsnset(wchar_t*,wchar_t,size_t); wchar_t* __cdecl _wcsrev(wchar_t*); wchar_t* __cdecl _wcsset(wchar_t*,wchar_t); diff --git a/include/msvcrt/wchar.h b/include/msvcrt/wchar.h index 285168a1a2c..f7656b25b9e 100644 --- a/include/msvcrt/wchar.h +++ b/include/msvcrt/wchar.h @@ -362,6 +362,7 @@ int __cdecl _wcsicmp(const wchar_t*,const wchar_t*); int __cdecl _wcsicoll(const wchar_t*,const wchar_t*); wchar_t* __cdecl _wcslwr(wchar_t*); int __cdecl _wcsnicmp(const wchar_t*,const wchar_t*,size_t); +int __cdecl _wcsnicoll(const wchar_t*,const wchar_t*,size_t); wchar_t* __cdecl _wcsnset(wchar_t*,wchar_t,size_t); wchar_t* __cdecl _wcsrev(wchar_t*); wchar_t* __cdecl _wcsset(wchar_t*,wchar_t);