From 97807760cad4bbbb06a072faa0c34b66ba952d55 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Thu, 10 Jun 2010 23:54:30 +0400 Subject: [PATCH] msvcrt: Add _scwprintf implementation. --- dlls/msvcr100/msvcr100.spec | 2 +- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/msvcrt.spec | 2 +- dlls/msvcrt/wcs.c | 14 ++++++++++++++ 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index b0b817204a5..44c5b315919 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -1012,7 +1012,7 @@ @ stub _scprintf_l @ stub _scprintf_p @ stub _scprintf_p_l -@ stub _scwprintf +@ varargs _scwprintf(wstr) msvcrt._scwprintf @ stub _scwprintf_l @ stub _scwprintf_p @ stub _scwprintf_p_l diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index a8ba61e26ef..256031cc3ef 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -857,7 +857,7 @@ @ stub _scprintf_l @ stub _scprintf_p @ stub _scprintf_p_l -@ stub _scwprintf +@ varargs _scwprintf(wstr) msvcrt._scwprintf @ stub _scwprintf_l @ stub _scwprintf_p @ stub _scwprintf_p_l diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index df65a5c0936..a2bed367fb6 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -843,7 +843,7 @@ @ stub _scprintf_l @ stub _scprintf_p @ stub _scprintf_p_l -@ stub _scwprintf +@ varargs _scwprintf(wstr) msvcrt._scwprintf @ stub _scwprintf_l @ stub _scwprintf_p @ stub _scwprintf_p_l diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 88a2ab981f6..bba06d6e640 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -801,7 +801,7 @@ # stub _scprintf # stub _scprintf_l # stub _scprintf_p_l -# stub _scwprintf +@ varargs _scwprintf(wstr) MSVCRT__scwprintf # stub _scwprintf_l # stub _scwprintf_p_l @ cdecl _searchenv(str str ptr) diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c index 4485db33d2e..03ecc7fdcbe 100644 --- a/dlls/msvcrt/wcs.c +++ b/dlls/msvcrt/wcs.c @@ -1246,6 +1246,20 @@ int CDECL MSVCRT_sprintf_s( char *str, MSVCRT_size_t num, const char *format, .. return r; } +/********************************************************************* + * _scwprintf (MSVCRT.@) + */ +int CDECL MSVCRT__scwprintf( const MSVCRT_wchar_t *format, ... ) +{ + __ms_va_list ap; + int r; + + __ms_va_start( ap, format ); + r = MSVCRT_vsnwprintf( NULL, INT_MAX, format, ap ); + __ms_va_end( ap ); + return r; +} + /********************************************************************* * swprintf (MSVCRT.@) */