Module: wine Branch: master Commit: b5d1d8e2b520a2703d97f51e77e9626a84081c0b URL: http://source.winehq.org/git/wine.git/?a=commit;h=b5d1d8e2b520a2703d97f51e77...
Author: Piotr Caban piotr@codeweavers.com Date: Thu May 12 11:39:43 2011 +0200
msvcrt: Added _strnicoll_l implementation.
---
dlls/msvcrt/msvcrt.spec | 4 ++-- dlls/msvcrt/string.c | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index e7294a5..8957e42 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -938,8 +938,8 @@ @ cdecl _strncoll_l(str str long ptr) MSVCRT_strncoll @ cdecl _strnicmp(str str long) ntdll._strnicmp # stub _strnicmp_l(str str long ptr) -@ stub _strnicoll(str str long) -# stub _strnicoll_l(str str long ptr) +@ cdecl _strnicoll(str str long) MSVCRT__strnicoll +@ cdecl _strnicoll_l(str str long ptr) MSVCRT__strnicoll_l @ cdecl _strnset(str long long) MSVCRT__strnset # stub _strnset_s(str long long long) @ cdecl _strrev(str) diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c index b6fe68b..0e7da1e 100644 --- a/dlls/msvcrt/string.c +++ b/dlls/msvcrt/string.c @@ -586,6 +586,26 @@ int CDECL MSVCRT_strncoll( const char* str1, const char* str2, MSVCRT_size_t cou }
/********************************************************************* + * _strnicoll_l (MSVCRT.@) + */ +int CDECL MSVCRT__strnicoll_l( const char* str1, const char* str2, MSVCRT_size_t count, MSVCRT__locale_t locale ) +{ + if(!locale) + locale = get_locale(); + + return CompareStringA(locale->locinfo->lc_handle[MSVCRT_LC_CTYPE], NORM_IGNORECASE, + str1, count, str2, count)-2; +} + +/********************************************************************* + * _strnicoll (MSVCRT.@) + */ +int CDECL MSVCRT__strnicoll( const char* str1, const char* str2, MSVCRT_size_t count ) +{ + return MSVCRT__strnicoll_l(str1, str2, count, NULL); +} + +/********************************************************************* * strcpy_s (MSVCRT.@) */ int CDECL MSVCRT_strcpy_s( char* dst, MSVCRT_size_t elem, const char* src )