Piotr Caban : msvcrt: Added _stricoll_l implementation.
Alexandre Julliard
julliard at winehq.org
Thu May 12 13:57:49 CDT 2011
Module: wine
Branch: master
Commit: ff7cf637df2b3dc3d58f6a320a855f4b8212c48c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ff7cf637df2b3dc3d58f6a320a855f4b8212c48c
Author: Piotr Caban <piotr at codeweavers.com>
Date: Thu May 12 11:39:22 2011 +0200
msvcrt: Added _stricoll_l implementation.
---
dlls/msvcrt/msvcrt.spec | 2 +-
dlls/msvcrt/string.c | 30 ++++++++++++++++++++----------
2 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec
index 605997c..958c6cb 100644
--- a/dlls/msvcrt/msvcrt.spec
+++ b/dlls/msvcrt/msvcrt.spec
@@ -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)
diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c
index a3d8d57..1e7e890 100644
--- a/dlls/msvcrt/string.c
+++ b/dlls/msvcrt/string.c
@@ -547,6 +547,26 @@ int CDECL MSVCRT_strcoll( const char* str1, const char* str2 )
}
/*********************************************************************
+ * _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.@)
*/
int CDECL MSVCRT_strcpy_s( char* dst, MSVCRT_size_t elem, const char* src )
@@ -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.@)
*/
More information about the wine-cvs
mailing list