1 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
2 #include <msvcrt/stdio.h>
3 #include <msvcrt/wchar.h>
4 #include <msvcrt/internal/file.h>
10 fprintf(register FILE *iop, const char *fmt, ...)
13 char localbuf[BUFSIZ];
18 if (iop->_flag & _IONBF)
20 iop->_flag &= ~_IONBF;
21 iop->_ptr = iop->_base = localbuf;
22 iop->_bufsiz = BUFSIZ;
23 len = vfprintf(iop,fmt,a);
31 len = vfprintf(iop, fmt, a);
32 return ferror(iop) ? EOF : len;
39 fwprintf(register FILE *iop, const wchar_t *fmt, ...)
42 wchar_t localbuf[BUFSIZ];
47 if (iop->_flag & _IONBF)
49 iop->_flag &= ~_IONBF;
50 iop->_ptr = iop->_base = (char *)localbuf;
51 iop->_bufsiz = BUFSIZ;
52 len = vfwprintf(iop,fmt,a);
60 len = vfwprintf(iop, fmt, a);
61 return ferror(iop) ? EOF : len;