[CRT] Implement the missing CRT _sc(w)printf() functions. CORE-14497

This commit is contained in:
Hermès Bélusca-Maïto 2018-03-23 22:30:18 +01:00
parent fd6e2d752d
commit 1a31889801
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
4 changed files with 54 additions and 2 deletions

View file

@ -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

View file

@ -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

View file

@ -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 <stdio.h>
#include <stdarg.h>
int
__cdecl
_scprintf(
const char *format,
...)
{
int len;
va_list args;
va_start(args, format);
len = _vscprintf(format, args);
va_end(args);
return len;
}

View file

@ -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 <stdio.h>
#include <stdarg.h>
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;
}