From 600fa766f30b3ceced2b5fdd384852608c090c6c Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Fri, 27 Aug 2010 01:46:25 +0200 Subject: [PATCH] msvcrt: Added _scprintf implementation. --- dlls/msvcr100/msvcr100.spec | 2 +- dlls/msvcr70/msvcr70.spec | 2 +- dlls/msvcr71/msvcr71.spec | 2 +- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/msvcrt.spec | 2 +- dlls/msvcrt/wcs.c | 13 +++++++++++++ 7 files changed, 19 insertions(+), 6 deletions(-) diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 5e8680b6f01..a1c5a37b20c 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -1055,7 +1055,7 @@ @ cdecl _scalb(double long) msvcrt._scalb @ varargs _scanf_l(str ptr) msvcrt._scanf_l @ varargs _scanf_s_l(str ptr) msvcrt._scanf_s_l -@ stub _scprintf +@ varargs _scprintf(str) msvcrt._scprintf @ stub _scprintf_l @ stub _scprintf_p @ stub _scprintf_p_l diff --git a/dlls/msvcr70/msvcr70.spec b/dlls/msvcr70/msvcr70.spec index 964a0e6b3f9..2949b54e0bc 100644 --- a/dlls/msvcr70/msvcr70.spec +++ b/dlls/msvcr70/msvcr70.spec @@ -509,7 +509,7 @@ @ cdecl -arch=i386 _safe_fprem() msvcrt._safe_fprem @ cdecl -arch=i386 _safe_fprem1() msvcrt._safe_fprem1 @ cdecl _scalb( double long) msvcrt._scalb -@ stub _scprintf +@ varargs _scprintf(str) msvcrt._scprintf @ varargs _scwprintf(wstr) msvcrt._scwprintf @ cdecl _searchenv(str str ptr) msvcrt._searchenv @ stdcall -i386 _seh_longjmp_unwind(ptr) msvcrt._seh_longjmp_unwind diff --git a/dlls/msvcr71/msvcr71.spec b/dlls/msvcr71/msvcr71.spec index 2483d6b6c55..8d488cf2067 100644 --- a/dlls/msvcr71/msvcr71.spec +++ b/dlls/msvcr71/msvcr71.spec @@ -504,7 +504,7 @@ @ cdecl _safe_fprem() msvcrt._safe_fprem @ cdecl _safe_fprem1() msvcrt._safe_fprem1 @ cdecl _scalb( double long) msvcrt._scalb -@ stub _scprintf +@ varargs _scprintf(str) msvcrt._scprintf @ varargs _scwprintf(wstr) msvcrt._scwprintf @ cdecl _searchenv(str str ptr) msvcrt._searchenv @ stdcall -i386 _seh_longjmp_unwind(ptr) msvcrt._seh_longjmp_unwind diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index f47bd83f757..a161b6467ab 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -907,7 +907,7 @@ @ cdecl _scalb( double long) msvcrt._scalb @ varargs _scanf_l(str ptr) msvcrt._scanf_l @ varargs _scanf_s_l(str ptr) msvcrt._scanf_s_l -@ stub _scprintf +@ varargs _scprintf(str) msvcrt._scprintf @ stub _scprintf_l @ stub _scprintf_p @ stub _scprintf_p_l diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index fbe5458b5f9..d369331939d 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -893,7 +893,7 @@ @ cdecl _scalb( double long) msvcrt._scalb @ varargs _scanf_l(str ptr) msvcrt._scanf_l @ varargs _scanf_s_l(str ptr) msvcrt._scanf_s_l -@ stub _scprintf +@ varargs _scprintf(str) msvcrt._scprintf @ stub _scprintf_l @ stub _scprintf_p @ stub _scprintf_p_l diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 93bbfd720b9..6d3e1dde753 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -836,7 +836,7 @@ @ cdecl -arch=x86_64 _scalbf(double long) MSVCRT__scalbf @ varargs _scanf_l(str ptr) MSVCRT__scanf_l @ varargs _scanf_s_l(str ptr) MSVCRT__scanf_s_l -# stub _scprintf +@ varargs _scprintf(str) MSVCRT__scprintf # stub _scprintf_l # stub _scprintf_p_l @ varargs _scwprintf(wstr) MSVCRT__scwprintf diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c index 529547bf9ab..9ee737ef5cc 100644 --- a/dlls/msvcrt/wcs.c +++ b/dlls/msvcrt/wcs.c @@ -1119,6 +1119,19 @@ int CDECL MSVCRT__snprintf_s(char *str, unsigned int len, unsigned int count, return retval; } +/********************************************************************* + * _scprintf (MSVCRT.@) + */ +int CDECL MSVCRT__scprintf(const char *format, ...) +{ + int retval; + __ms_va_list valist; + __ms_va_start(valist, format); + retval = _vscprintf(format, valist); + __ms_va_end(valist); + return retval; +} + /********************************************************************* * vsnwprintf_internal (INTERNAL) */