Blob
1 /* Copyright (c) 2002-2006 Lucent Technologies; see LICENSE */2 #include <stdarg.h>3 #include <string.h>4 #include "plan9.h"5 #include "fmt.h"6 #include "fmtdef.h"9 /*10 * format a string into the output buffer11 * designed for formats which themselves call fmt,12 * but ignore any width flags13 */14 int15 fmtvprint(Fmt *f, char *fmt, va_list args)16 {17 va_list va;18 int n;20 f->flags = 0;21 f->width = 0;22 f->prec = 0;23 VA_COPY(va,f->args);24 VA_END(f->args);25 VA_COPY(f->args,args);26 n = dofmt(f, fmt);27 f->flags = 0;28 f->width = 0;29 f->prec = 0;30 VA_END(f->args);31 VA_COPY(f->args,va);32 VA_END(va);33 if(n >= 0)34 return 0;35 return n;36 }