Author: spetreolle
Date: Mon May 20 16:28:43 2013
New Revision: 59052
URL:
http://svn.reactos.org/svn/reactos?rev=59052&view=rev
Log:
[CRT]
Import _wcslwr_s from Wine.
Added:
trunk/reactos/lib/sdk/crt/string/_wcslwr_s.c (with props)
Modified:
trunk/reactos/dll/win32/msvcrt/msvcrt.spec
trunk/reactos/lib/sdk/crt/crt.cmake
Modified: trunk/reactos/dll/win32/msvcrt/msvcrt.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msvcrt/msvcrt.sp…
==============================================================================
--- trunk/reactos/dll/win32/msvcrt/msvcrt.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msvcrt/msvcrt.spec [iso-8859-1] Mon May 20 16:28:43 2013
@@ -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
Modified: trunk/reactos/lib/sdk/crt/crt.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/crt.cmake?rev=…
==============================================================================
--- trunk/reactos/lib/sdk/crt/crt.cmake [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/crt.cmake [iso-8859-1] Mon May 20 16:28:43 2013
@@ -262,6 +262,7 @@
string/_mbstrnlen.c
string/_splitpath.c
string/_splitpath_s.c
+ string/_wcslwr_s.c
string/_wsplitpath.c
string/_wsplitpath_s.c
string/atof.c
Added: trunk/reactos/lib/sdk/crt/string/_wcslwr_s.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/_wcslwr…
==============================================================================
--- trunk/reactos/lib/sdk/crt/string/_wcslwr_s.c (added)
+++ trunk/reactos/lib/sdk/crt/string/_wcslwr_s.c [iso-8859-1] Mon May 20 16:28:43 2013
@@ -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;
+}
Propchange: trunk/reactos/lib/sdk/crt/string/_wcslwr_s.c
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/reactos/lib/sdk/crt/string/_wcslwr_s.c
------------------------------------------------------------------------------
svn:mime-type = text/plain