minimal plan9port to cross-build Jehanne

This commit is contained in:
2021-12-22 10:35:45 +01:00
commit c43269a19e
245 changed files with 26213 additions and 0 deletions

21
lib/lib9/fmt/vfprint.c Normal file
View File

@ -0,0 +1,21 @@
/* Copyright (c) 2002-2006 Lucent Technologies; see LICENSE */
#include <stdarg.h>
#include "plan9.h"
#include "fmt.h"
#include "fmtdef.h"
int
vfprint(int fd, char *fmt, va_list args)
{
Fmt f;
char buf[256];
int n;
fmtfdinit(&f, fd, buf, sizeof(buf));
VA_COPY(f.args,args);
n = dofmt(&f, fmt);
VA_END(f.args);
if(n > 0 && __fmtFdFlush(&f) == 0)
return -1;
return n;
}