#include <9pm/u.h>
#include <9pm/libc.h>

#define	SIZE	4096
extern	int	printcol;

int
fprint(int f, char *fmt, ...)
{
	char buf[SIZE], *out;
	va_list arg;
	int n;

	va_start(arg, fmt);
	out = doprint(buf, buf+SIZE, fmt, arg);
	va_end(arg);
	n = write(f, buf, (long)(out-buf));
	return n;
}
