Module: wine Branch: master Commit: 1a234159fe1e5fc24a0035f43265f70672abd41f URL: http://source.winehq.org/git/wine.git/?a=commit;h=1a234159fe1e5fc24a0035f432...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Thu Jun 10 23:28:01 2010 +0400
msvcrt: Add _snwprintf_s 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 e6524d6..b0b8172 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -1052,7 +1052,7 @@ @ stub _snscanf_s_l @ varargs _snwprintf(ptr long wstr) msvcrt._snwprintf @ stub _snwprintf_l -@ stub _snwprintf_s +@ varargs _snwprintf_s(ptr long long wstr) msvcrt._snwprintf_s @ stub _snwprintf_s_l @ stub _snwscanf @ stub _snwscanf_l diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index db65318..a8ba61e 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -899,7 +899,7 @@ @ stub _snscanf_s_l @ varargs _snwprintf(ptr long wstr) msvcrt._snwprintf @ stub _snwprintf_l -@ stub _snwprintf_s +@ varargs _snwprintf_s(ptr long long wstr) msvcrt._snwprintf_s @ stub _snwprintf_s_l @ stub _snwscanf @ stub _snwscanf_l diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 1da6e82..df65a5c 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -885,7 +885,7 @@ @ stub _snscanf_s_l @ varargs _snwprintf(ptr long wstr) msvcrt._snwprintf @ stub _snwprintf_l -@ stub _snwprintf_s +@ varargs _snwprintf_s(ptr long long wstr) msvcrt._snwprintf_s @ stub _snwprintf_s_l @ stub _snwscanf @ stub _snwscanf_l diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index ff19519..88a2ab9 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -838,7 +838,7 @@ # stub _snscanf_s_l @ varargs _snwprintf(ptr long wstr) MSVCRT__snwprintf # stub _snwprintf_l -# stub _snwprintf_s +@ varargs _snwprintf_s(ptr long long wstr) MSVCRT__snwprintf_s # stub _snwprintf_s_l # stub _snwscanf # stub _snwscanf_l diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c index 9571928..4485db3 100644 --- a/dlls/msvcrt/wcs.c +++ b/dlls/msvcrt/wcs.c @@ -1205,6 +1205,20 @@ int CDECL MSVCRT__snwprintf( MSVCRT_wchar_t *str, unsigned int len, const MSVCRT }
/********************************************************************* + * _snwprintf_s (MSVCRT.@) + */ +int CDECL MSVCRT__snwprintf_s( MSVCRT_wchar_t *str, unsigned int len, unsigned int count, + const MSVCRT_wchar_t *format, ...) +{ + int retval; + __ms_va_list valist; + __ms_va_start(valist, format); + retval = MSVCRT_vsnwprintf_s_l(str, len, count, format, NULL, valist); + __ms_va_end(valist); + return retval; +} + +/********************************************************************* * sprintf (MSVCRT.@) */ int CDECL MSVCRT_sprintf( char *str, const char *format, ... )