Blob
1 /* Copyright (c) 2002-2006 Lucent Technologies; see LICENSE */2 #include <stdarg.h>3 #include "plan9.h"4 #include "fmt.h"5 #include "fmtdef.h"7 int8 vfprint(int fd, char *fmt, va_list args)9 {10 Fmt f;11 char buf[256];12 int n;14 fmtfdinit(&f, fd, buf, sizeof(buf));15 VA_COPY(f.args,args);16 n = dofmt(&f, fmt);17 VA_END(f.args);18 if(n > 0 && __fmtFdFlush(&f) == 0)19 return -1;20 return n;21 }