msvcrt: Added _stricoll_l implementation.

This commit is contained in:
Piotr Caban 2011-05-12 11:39:22 +02:00 committed by Alexandre Julliard
parent e07dbe2c0a
commit ff7cf637df
2 changed files with 21 additions and 11 deletions

View File

@ -929,7 +929,7 @@
@ cdecl _stricmp(str str) ntdll._stricmp
# stub _stricmp_l(str str ptr)
@ cdecl _stricoll(str str) MSVCRT__stricoll
# stub _stricoll_l(str str ptr)
@ cdecl _stricoll_l(str str ptr) MSVCRT__stricoll_l
@ cdecl _strlwr(str)
@ cdecl _strlwr_l(str ptr)
@ cdecl _strlwr_s(ptr long)

View File

@ -546,6 +546,26 @@ int CDECL MSVCRT_strcoll( const char* str1, const char* str2 )
return MSVCRT_strcoll_l(str1, str2, NULL);
}
/*********************************************************************
* _stricoll_l (MSVCRT.@)
*/
int CDECL MSVCRT__stricoll_l( const char* str1, const char* str2, MSVCRT__locale_t locale )
{
if(!locale)
locale = get_locale();
return CompareStringA(locale->locinfo->lc_handle[MSVCRT_LC_CTYPE], NORM_IGNORECASE,
str1, -1, str2, -1)-2;
}
/*********************************************************************
* _stricoll (MSVCRT.@)
*/
int CDECL MSVCRT__stricoll( const char* str1, const char* str2 )
{
return MSVCRT__stricoll_l(str1, str2, NULL);
}
/*********************************************************************
* strcpy_s (MSVCRT.@)
*/
@ -644,16 +664,6 @@ MSVCRT_size_t CDECL MSVCRT_strxfrm( char *dest, const char *src, MSVCRT_size_t l
return strxfrm( dest, src, len );
}
/*********************************************************************
* _stricoll (MSVCRT.@)
*/
int CDECL MSVCRT__stricoll( const char* str1, const char* str2 )
{
/* FIXME: handle collates */
TRACE("str1 %s str2 %s\n", debugstr_a(str1), debugstr_a(str2));
return lstrcmpiA( str1, str2 );
}
/********************************************************************
* _atoldbl (MSVCRT.@)
*/