mirror of
https://github.com/reactos/reactos.git
synced 2024-09-30 22:47:28 +00:00
[CRT] Fix implementation of _vsc(w)printf() for native NT.
This commit is contained in:
parent
7f95c14153
commit
fd6e2d752d
|
@ -11,9 +11,10 @@
|
||||||
int __cdecl streamout(FILE *stream, const char *format, va_list argptr);
|
int __cdecl streamout(FILE *stream, const char *format, va_list argptr);
|
||||||
|
|
||||||
int
|
int
|
||||||
|
__cdecl
|
||||||
_vscprintf(
|
_vscprintf(
|
||||||
const char *format,
|
const char *format,
|
||||||
va_list argptr)
|
va_list argptr)
|
||||||
{
|
{
|
||||||
FILE nulfile;
|
FILE nulfile;
|
||||||
nulfile._tmpfname = nulfile._ptr = nulfile._base = NULL;
|
nulfile._tmpfname = nulfile._ptr = nulfile._base = NULL;
|
||||||
|
|
|
@ -2,33 +2,23 @@
|
||||||
* COPYRIGHT: GNU GPL, see COPYING in the top level directory
|
* COPYRIGHT: GNU GPL, see COPYING in the top level directory
|
||||||
* PROJECT: ReactOS crt library
|
* PROJECT: ReactOS crt library
|
||||||
* FILE: lib/sdk/crt/printf/_vscwprintf.c
|
* FILE: lib/sdk/crt/printf/_vscwprintf.c
|
||||||
* PURPOSE: Implementation of _vscprintf
|
* PURPOSE: Implementation of _vscwprintf
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
#ifdef _LIBCNT_
|
|
||||||
#include <ntddk.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int __cdecl wstreamout(FILE *stream, const wchar_t *format, va_list argptr);
|
int __cdecl wstreamout(FILE *stream, const wchar_t *format, va_list argptr);
|
||||||
|
|
||||||
int
|
int
|
||||||
__cdecl
|
__cdecl
|
||||||
_vscwprintf(
|
_vscwprintf(
|
||||||
const wchar_t *format,
|
const wchar_t *format,
|
||||||
va_list argptr)
|
va_list argptr)
|
||||||
{
|
{
|
||||||
int ret;
|
|
||||||
#ifndef _LIBCNT_
|
|
||||||
FILE nulfile;
|
FILE nulfile;
|
||||||
nulfile._tmpfname = nulfile._ptr = nulfile._base = NULL;
|
nulfile._tmpfname = nulfile._ptr = nulfile._base = NULL;
|
||||||
nulfile._bufsiz = nulfile._charbuf = nulfile._cnt = 0;
|
nulfile._bufsiz = nulfile._charbuf = nulfile._cnt = 0;
|
||||||
nulfile._flag = _IOSTRG | _IOWRT;
|
nulfile._flag = _IOSTRG | _IOWRT;
|
||||||
ret = wstreamout(&nulfile, format, argptr);
|
return wstreamout(&nulfile, format, argptr);
|
||||||
#else
|
|
||||||
ret = -1;
|
|
||||||
#endif
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue