mirror of
https://github.com/reactos/reactos.git
synced 2024-07-02 10:45:24 +00:00
[CRT]
Import _wcslwr_s from Wine. svn path=/trunk/; revision=59052
This commit is contained in:
parent
83a72b8196
commit
b7693777d9
|
@ -1026,7 +1026,7 @@
|
||||||
# stub _wcsicoll_l
|
# stub _wcsicoll_l
|
||||||
@ cdecl _wcslwr(wstr)
|
@ cdecl _wcslwr(wstr)
|
||||||
# stub _wcslwr_l
|
# stub _wcslwr_l
|
||||||
# stub _wcslwr_s
|
@ cdecl _wcslwr_s(wstr long)
|
||||||
# stub _wcslwr_s_l
|
# stub _wcslwr_s_l
|
||||||
@ cdecl _wcsncoll(wstr wstr long)
|
@ cdecl _wcsncoll(wstr wstr long)
|
||||||
# stub _wcsncoll_l
|
# stub _wcsncoll_l
|
||||||
|
|
|
@ -262,6 +262,7 @@ list(APPEND CRT_SOURCE
|
||||||
string/_mbstrnlen.c
|
string/_mbstrnlen.c
|
||||||
string/_splitpath.c
|
string/_splitpath.c
|
||||||
string/_splitpath_s.c
|
string/_splitpath_s.c
|
||||||
|
string/_wcslwr_s.c
|
||||||
string/_wsplitpath.c
|
string/_wsplitpath.c
|
||||||
string/_wsplitpath_s.c
|
string/_wsplitpath_s.c
|
||||||
string/atof.c
|
string/atof.c
|
||||||
|
|
38
reactos/lib/sdk/crt/string/_wcslwr_s.c
Normal file
38
reactos/lib/sdk/crt/string/_wcslwr_s.c
Normal 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;
|
||||||
|
}
|
Loading…
Reference in a new issue