Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include <u.h>
2
#include <libc.h>
3
#include "fmtdef.h"
4
 
5
int
6
vfprint(int fd, char *fmt, va_list args)
7
{
8
	Fmt f;
9
	char buf[256];
10
	int n;
11
 
12
	fmtfdinit(&f, fd, buf, sizeof(buf));
13
	VA_COPY(f.args,args);
14
	n = dofmt(&f, fmt);
15
	VA_END(f.args);
16
	if(n > 0 && __fmtFdFlush(&f) == 0)
17
		return -1;
18
	return n;
19
}