Blame


1 b2cfc4e2 2003-09-30 devnull #include "lib9.h"
2 b2cfc4e2 2003-09-30 devnull #include <bio.h>
3 b2cfc4e2 2003-09-30 devnull
4 b2cfc4e2 2003-09-30 devnull int
5 b2cfc4e2 2003-09-30 devnull Bprint(Biobuf *bp, char *fmt, ...)
6 b2cfc4e2 2003-09-30 devnull {
7 669250d1 2003-12-03 devnull va_list args;
8 669250d1 2003-12-03 devnull Fmt f;
9 b2cfc4e2 2003-09-30 devnull int n;
10 b2cfc4e2 2003-09-30 devnull
11 669250d1 2003-12-03 devnull if(Bfmtinit(&f, bp) < 0)
12 669250d1 2003-12-03 devnull return -1;
13 f5ff4947 2004-12-28 devnull va_start(args, fmt);
14 65cd9e4d 2004-12-28 devnull n = fmtprint(&f, fmt, args);
15 f5ff4947 2004-12-28 devnull va_end(args);
16 62780722 2004-04-25 devnull if(n > 0 && Bfmtflush(&f) < 0)
17 62780722 2004-04-25 devnull return -1;
18 b2cfc4e2 2003-09-30 devnull return n;
19 b2cfc4e2 2003-09-30 devnull }