Import _wcslwr_s from Wine.


svn path=/trunk/; revision=59052
This commit is contained in:
Sylvain Petreolle 2013-05-20 16:28:43 +00:00
parent 83a72b8196
commit b7693777d9
3 changed files with 40 additions and 1 deletions

View file

@ -1026,7 +1026,7 @@
# stub _wcsicoll_l
@ cdecl _wcslwr(wstr)
# stub _wcslwr_l
# stub _wcslwr_s
@ cdecl _wcslwr_s(wstr long)
# stub _wcslwr_s_l
@ cdecl _wcsncoll(wstr wstr long)
# stub _wcsncoll_l

View file

@ -262,6 +262,7 @@ list(APPEND CRT_SOURCE
string/_mbstrnlen.c
string/_splitpath.c
string/_splitpath_s.c
string/_wcslwr_s.c
string/_wsplitpath.c
string/_wsplitpath_s.c
string/atof.c

View file

@ -0,0 +1,38 @@
/*
* The C RunTime DLL
*
* Implements C run-time functionality as known from UNIX.
*
* Copyright 1996,1998 Marcus Meissner
* Copyright 1996 Jukka Iivonen
* Copyright 1997 Uwe Bonnes
*/
#include <precomp.h>
/*
* @implemented
*/
int _wcslwr_s(wchar_t* str, size_t n)
{
wchar_t *ptr=str;
if (!str || !n)
{
if (str) *str = '\0';
*_errno() = EINVAL;
return EINVAL;
}
while (n--)
{
if (!*ptr) return 0;
*ptr = towlower(*ptr);
ptr++;
}
/* MSDN claims that the function should return and set errno to
* ERANGE, which doesn't seem to be true based on the tests. */
*str = '\0';
*_errno() = EINVAL;
return EINVAL;
}