fxlibc/src/libc/stdio/dprintf.c

21 lines
303 B
C

#include <stdio.h>
#include <fxlibc/printf.h>
int dprintf(int fd, char const * restrict fmt, ...)
{
if(fd < 0) return -1;
struct __printf_output out = {
.fd = fd,
.size = 65536,
};
va_list args;
va_start(args, fmt);
int count = __printf(&out, fmt, &args);
va_end(args);
return count;
}