mirror of
https://github.com/reactos/reactos.git
synced 2025-06-26 21:49:45 +00:00
[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
This commit is contained in:
parent
5bf403a592
commit
ce424af08c
30 changed files with 327 additions and 184 deletions
|
@ -4,17 +4,15 @@
|
|||
* FILE: lib/sdk/crt/printf/vfprintf.c
|
||||
* PURPOSE: Implementation of vfprintf
|
||||
* PROGRAMMER: Timo Kreuzer
|
||||
* Samuel Serapión
|
||||
*/
|
||||
|
||||
#include <precomp.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
void CDECL _lock_file(FILE* file);
|
||||
void CDECL _unlock_file(FILE* file);
|
||||
int CDECL streamout(FILE *stream, const char *format, va_list argptr);
|
||||
int _cdecl streamout(FILE *stream, const char *format, va_list argptr);
|
||||
|
||||
int
|
||||
CDECL
|
||||
_cdecl
|
||||
vfprintf(FILE *file, const char *format, va_list argptr)
|
||||
{
|
||||
int result;
|
||||
|
@ -26,20 +24,3 @@ vfprintf(FILE *file, const char *format, va_list argptr)
|
|||
return result;
|
||||
}
|
||||
|
||||
int
|
||||
CDECL
|
||||
vfprintf_s(FILE* file, const char *format, va_list argptr)
|
||||
{
|
||||
int result;
|
||||
|
||||
if(!MSVCRT_CHECK_PMT(format != NULL)) {
|
||||
*_errno() = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
_lock_file(file);
|
||||
result = streamout(file, format, argptr);
|
||||
_unlock_file(file);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue