Author: akhaldi
Date: Mon Nov 16 22:01:01 2015
New Revision: 69905
URL:
http://svn.reactos.org/svn/reactos?rev=69905&view=rev
Log:
[CRT] Import _snscanf() from Wine Staging 1.7.55. [MSVCRT] Export _snscanf(). CORE-10529
CORE-10536
Modified:
trunk/reactos/dll/win32/msvcrt/msvcrt.spec
trunk/reactos/lib/sdk/crt/string/scanf.c
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 Nov 16 22:01:01 2015
@@ -618,7 +618,7 @@
@ cdecl _setsystime(ptr long)
@ cdecl _sleep(long)
@ varargs _snprintf(ptr long str)
-# stub _snscanf
+@ varargs _snscanf(str long str)
@ varargs _snwprintf(ptr long wstr)
# stub _snwscanf
@ varargs _sopen(str long long)
Modified: trunk/reactos/lib/sdk/crt/string/scanf.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/scanf.c…
==============================================================================
--- trunk/reactos/lib/sdk/crt/string/scanf.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/string/scanf.c [iso-8859-1] Mon Nov 16 22:01:01 2015
@@ -87,6 +87,14 @@
#undef SECURE
#include "scanf.h"
+/* vsnscanf_l */
+#undef WIDE_SCANF
+#undef CONSOLE
+#define STRING 1
+#define STRING_LEN 1
+#undef SECURE
+#include "scanf.h"
+
#ifndef _LIBCNT_
/* vcscanf_l */
#undef WIDE_SCANF
@@ -199,3 +207,17 @@
return res;
}
#endif
+
+/*********************************************************************
+ * _snscanf (MSVCRT.@)
+ */
+int CDECL _snscanf(const char *input, size_t length, const char *format, ...)
+{
+ __ms_va_list valist;
+ int res;
+
+ __ms_va_start(valist, format);
+ res = vsnscanf_l(input, length, format, NULL, valist);
+ __ms_va_end(valist);
+ return res;
+}