From: Hermès Bélusca-Maïto Date: Fri, 23 Mar 2018 21:30:18 +0000 (+0100) Subject: [CRT] Implement the missing CRT _sc(w)printf() functions. CORE-14497 X-Git-Tag: 0.4.9-RC~424 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=1a318898010a8c94624b60966acf546284c636d9 [CRT] Implement the missing CRT _sc(w)printf() functions. CORE-14497 --- diff --git a/dll/win32/msvcrt/msvcrt.spec b/dll/win32/msvcrt/msvcrt.spec index 368c97e4cc3..202bf7e115a 100644 --- a/dll/win32/msvcrt/msvcrt.spec +++ b/dll/win32/msvcrt/msvcrt.spec @@ -601,8 +601,8 @@ @ cdecl -arch=i386 _safe_fprem() @ cdecl -arch=i386 _safe_fprem1() @ cdecl _scalb(double long) -# stub _scprintf -# stub _scwprintf +@ varargs _scprintf(str) +@ varargs _scwprintf(wstr) @ cdecl _searchenv(str str ptr) @ stdcall -i386 _seh_longjmp_unwind(ptr) # stub _set_SSE2_enable diff --git a/sdk/lib/crt/crt.cmake b/sdk/lib/crt/crt.cmake index 66c5b52e1da..a6a7e5dc137 100644 --- a/sdk/lib/crt/crt.cmake +++ b/sdk/lib/crt/crt.cmake @@ -135,6 +135,8 @@ list(APPEND CRT_SOURCE misc/tls.c printf/_cprintf.c printf/_cwprintf.c + printf/_scprintf.c + printf/_scwprintf.c printf/_snprintf.c printf/_snprintf_s.c printf/_snwprintf.c diff --git a/sdk/lib/crt/printf/_scprintf.c b/sdk/lib/crt/printf/_scprintf.c new file mode 100644 index 00000000000..9eb30ca4e3c --- /dev/null +++ b/sdk/lib/crt/printf/_scprintf.c @@ -0,0 +1,25 @@ +/* + * COPYRIGHT: GNU GPL, see COPYING in the top level directory + * PROJECT: ReactOS crt library + * FILE: lib/sdk/crt/printf/_scprintf.c + * PURPOSE: Implementation of _scprintf + */ + +#include +#include + +int +__cdecl +_scprintf( + const char *format, + ...) +{ + int len; + va_list args; + + va_start(args, format); + len = _vscprintf(format, args); + va_end(args); + + return len; +} diff --git a/sdk/lib/crt/printf/_scwprintf.c b/sdk/lib/crt/printf/_scwprintf.c new file mode 100644 index 00000000000..78c4c9ee1a8 --- /dev/null +++ b/sdk/lib/crt/printf/_scwprintf.c @@ -0,0 +1,25 @@ +/* + * COPYRIGHT: GNU GPL, see COPYING in the top level directory + * PROJECT: ReactOS crt library + * FILE: lib/sdk/crt/printf/_scwprintf.c + * PURPOSE: Implementation of _scwprintf + */ + +#include +#include + +int +__cdecl +_scwprintf( + const wchar_t *format, + ...) +{ + int len; + va_list args; + + va_start(args, format); + len = _vscwprintf(format, args); + va_end(args); + + return len; +}