Blob
1 #include "lib9.h"2 #include <bio.h>4 int5 Bbuffered(Biobuf *bp)6 {7 switch(bp->state) {8 case Bracteof:9 case Bractive:10 return -bp->icount;12 case Bwactive:13 return bp->bsize + bp->ocount;15 case Binactive:16 return 0;17 }18 fprint(2, "Bbuffered: unknown state %d\n", bp->state);19 return 0;20 }