Alexandre Julliard : ntdll: Add _vscprintf and _vscwprintf.

Alexandre Julliard julliard at winehq.org
Fri Jul 1 14:01:02 CDT 2022


Module: wine
Branch: master
Commit: 607a38246b2690014fb5cf36bca8818119742e54
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=607a38246b2690014fb5cf36bca8818119742e54

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Jul  1 16:24:30 2022 +0200

ntdll: Add _vscprintf and _vscwprintf.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/ntdll.spec |  4 +++-
 dlls/ntdll/printf.c   | 19 +++++++++++++++++++
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 26dd6c33879..165d7a31a2b 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -1523,7 +1523,6 @@
 @ varargs _snprintf_s(ptr long long str)
 @ varargs _snwprintf(ptr long wstr)
 @ varargs _snwprintf_s(ptr long long wstr)
-@ varargs _swprintf(ptr wstr) NTDLL_swprintf
 @ cdecl _splitpath(str ptr ptr ptr ptr)
 @ cdecl _splitpath_s(str ptr long ptr long ptr long ptr long)
 @ cdecl _strcmpi(str str) _stricmp
@@ -1533,6 +1532,7 @@
 @ cdecl _strnicmp(str str long)
 @ cdecl _strupr(str)
 @ cdecl _strupr_s(str long)
+@ varargs _swprintf(ptr wstr) NTDLL_swprintf
 @ cdecl _tolower(long)
 @ cdecl _toupper(long)
 @ cdecl _ui64toa(int64 ptr long)
@@ -1543,6 +1543,8 @@
 @ cdecl _ultoa_s(long ptr long long)
 @ cdecl _ultow(long ptr long)
 @ cdecl _ultow_s(long ptr long long)
+@ cdecl _vscprintf(str ptr)
+@ cdecl _vscwprintf(wstr ptr)
 @ cdecl -norelay _vsnprintf(ptr long str ptr)
 @ cdecl _vsnprintf_s(ptr long str ptr)
 @ cdecl _vsnwprintf(ptr long wstr ptr)
diff --git a/dlls/ntdll/printf.c b/dlls/ntdll/printf.c
index cb7c1ebcae4..37419ea1e83 100644
--- a/dlls/ntdll/printf.c
+++ b/dlls/ntdll/printf.c
@@ -21,6 +21,7 @@
 
 #include <assert.h>
 #include <ctype.h>
+#include <limits.h>
 #include <stdarg.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -75,6 +76,24 @@ int CDECL _vsnwprintf( WCHAR *str, size_t len, const WCHAR *format, va_list args
 }
 
 
+/*********************************************************************
+ *                  _vscprintf   (NTDLL.@)
+ */
+int CDECL _vscprintf( const char *format, va_list valist )
+{
+    return _vsnprintf( NULL, INT_MAX, format, valist );
+}
+
+
+/*********************************************************************
+ *                  _vscwprintf   (NTDLL.@)
+ */
+int CDECL _vscwprintf( const wchar_t *format, va_list args )
+{
+    return _vsnwprintf( NULL, INT_MAX, format, args );
+}
+
+
 /*********************************************************************
  *                  _snprintf   (NTDLL.@)
  */




More information about the wine-cvs mailing list