reactos/reactos/lib/sdk/crt/printf/vfwprintf_s.c
Sylvain Petreolle ce424af08c [CRT/MSVCRT]
Follow original design/style of printf module
Always use dosmaperr to convert win32 errors to sane crt errors
Enable forgotten _get_doserrno, get_errno, set_doserrno and _gmtime32_s
Small fixes to pass more wine tests.

Patch by Samuel Serapión.

svn path=/trunk/; revision=54661
2011-12-16 15:44:37 +00:00

34 lines
759 B
C

/*
* COPYRIGHT: GNU GPL, see COPYING in the top level directory
* PROJECT: ReactOS crt library
* FILE: lib/sdk/crt/printf/vfwprintf.c
* PURPOSE: Implementation of vfwprintf
* PROGRAMMER: Timo Kreuzer
* Samuel Serapión
*/
#define MINGW_HAS_SECURE_API 1
#include <stdio.h>
#include <stdarg.h>
#include <internal/safecrt.h>
int _cdecl wstreamout(FILE *stream, const wchar_t *format, va_list argptr);
int
_cdecl
vfwprintf_s(FILE* file, const wchar_t *format, va_list argptr)
{
int ret;
if(!MSVCRT_CHECK_PMT( file != NULL)) {
_set_errno(EINVAL);
return -1;
}
_lock_file(file);
ret = wstreamout(file, format, argptr);
_unlock_file(file);
return ret;
}