1 #include "stdio_impl.h"
3 static size_t wrap_write(FILE *f, const unsigned char *buf, size_t len)
5 return __stdio_write(f, buf, len);
8 int vdprintf(int fd, const char *fmt, va_list ap)
11 unsigned char buf[BUFSIZ];
13 .fd = fd, .lbf = EOF, .write = wrap_write,
14 .buf = buf+UNGET, .buf_size = sizeof buf - UNGET,
17 r = vfprintf(&f, fmt, ap);
18 return fflush(&f) ? EOF : r;