#include <9pm/u.h>
#include <9pm/libc.h>
#include <9pm/fcall.h>
#include "dat.h"
#include "fns.h"

#define	SIZE	256

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

	va_start(arg, fmt);
	out = doprint(buf, buf+SIZE, fmt, arg);
	va_end(arg);
	dwrite(buf);
	return out-buf;
}


syntax highlighted by Code2HTML, v. 0.9.1