[CMAKE]
[reactos.git] / lib / sdk / crt / printf / vfprintf.c
1 /*
2 * COPYRIGHT: GNU GPL, see COPYING in the top level directory
3 * PROJECT: ReactOS crt library
4 * FILE: lib/sdk/crt/printf/vfprintf.c
5 * PURPOSE: Implementation of vfprintf
6 * PROGRAMMER: Timo Kreuzer
7 */
8
9 #include <stdio.h>
10 #include <stdarg.h>
11
12 void _cdecl _lock_file(FILE* file);
13 void _cdecl _unlock_file(FILE* file);
14 int _cdecl streamout(FILE *stream, const char *format, va_list argptr);
15
16 int
17 _cdecl
18 vfprintf(FILE *stream, const char *format, va_list argptr)
19 {
20 int result;
21
22 _lock_file(stream);
23
24 result = streamout(stream, format, argptr);
25
26 _unlock_file(stream);
27
28 return result;
29 }