URI: 
       tfix Bprint yet again - plan9port - [fork] Plan 9 from user space
  HTML git clone git://src.adamsgaard.dk/plan9port
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit 8b45564f0fd8eccbeaefc79d25470a451c5328d2
   DIR parent 1369edef9f26a5a127b60b1163564c2570d9a7d9
  HTML Author: rsc <devnull@localhost>
       Date:   Tue, 28 Dec 2004 19:18:19 +0000
       
       fix Bprint yet again
       
       Diffstat:
         D src/libbio/bfmt.c                   |      41 -------------------------------
         M src/libbio/bprint.c                 |      13 ++++---------
         M src/libbio/mkfile                   |       6 +++---
       
       3 files changed, 7 insertions(+), 53 deletions(-)
       ---
   DIR diff --git a/src/libbio/bfmt.c b/src/libbio/bfmt.c
       t@@ -1,41 +0,0 @@
       -#include "lib9.h"
       -#include <bio.h>
       -
       -static int
       -_Bfmtflush(Fmt *f)
       -{
       -        Biobuf *b;
       -
       -        b = f->farg;
       -        b->ocount = (char*)f->to - (char*)f->stop;
       -        if(Bflush(b) < 0)
       -                return 0;
       -        f->to = b->ebuf+b->ocount;
       -        return 1;
       -}
       -
       -int
       -Bfmtinit(Fmt *f, Biobuf *b)
       -{
       -        if(b->state != Bwactive)
       -                return -1;
       -        memset(f, 0, sizeof *f);
       -        f->farg = b;
       -        f->start = b->bbuf;
       -        f->to = b->ebuf+b->ocount;
       -        f->stop = b->ebuf;
       -        f->flush = _Bfmtflush;
       -        return 0;
       -}
       -
       -int
       -Bfmtflush(Fmt *f)
       -{
       -        Biobuf *b;
       -
       -        b = f->farg;
       -        if(f->to == nil)
       -                return -1;
       -        b->ocount = (char*)f->to - (char*)f->stop;
       -        return f->nfmt;
       -}
   DIR diff --git a/src/libbio/bprint.c b/src/libbio/bprint.c
       t@@ -4,16 +4,11 @@
        int
        Bprint(Biobuf *bp, char *fmt, ...)
        {
       -        va_list args;
       -        Fmt f;
                int n;
       +        va_list arg;
        
       -        if(Bfmtinit(&f, bp) < 0)
       -                return -1;
       -        va_start(args, fmt);
       -        n = fmtvprint(&f, fmt, args);
       -        va_end(args);
       -        if(n > 0 && Bfmtflush(&f) < 0)
       -                return -1;
       +        va_start(arg, fmt);
       +        n = Bvprint(bp, fmt, arg);
       +        va_end(arg);
                return n;
        }
   DIR diff --git a/src/libbio/mkfile b/src/libbio/mkfile
       t@@ -6,20 +6,20 @@ OFILES=\
                bbuffered.$O\
                bfildes.$O\
                bflush.$O\
       -        bfmt.$O\
                bgetc.$O\
       +        bgetrune.$O\
                bgetd.$O\
                binit.$O\
                boffset.$O\
                bprint.$O\
                bputc.$O\
       +        bputrune.$O\
                brdline.$O\
                brdstr.$O\
                bread.$O\
                bseek.$O\
       +        bvprint.$O\
                bwrite.$O\
       -        bgetrune.$O\
       -        bputrune.$O\
        
        HFILES=\
                $PLAN9/include/bio.h\