*** empty log message ***
[reactos.git] / reactos / lib / crtdll / stdio / printf.c
1 /* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */
2 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
3 #include <crtdll/stdio.h>
4 #include <crtdll/internal/file.h>
5
6
7 int printf(const char *fmt, ...)
8 {
9 int len;
10 va_list a;
11
12 va_start( a, fmt );
13 len = _doprnt(fmt, a, stdout);
14
15 /* People were confused when printf() didn't flush stdout,
16 so we'll do it to reduce confusion */
17 if (stdout->_flag & _IOLBF)
18 fflush(stdout);
19
20 return ferror(stdout) ? EOF : len;
21 }