Jeff Sickelimport libbiocd2d62814 years agoHistory
22 lines · 318 B · C
RawDownload
#include	<u.h>#include	<libc.h>#undef long#include	<bio.h> intBbuffered(Biobuf *bp){	switch(bp->state) {	case Bracteof:	case Bractive:		return -bp->icount; 	case Bwactive:		return bp->bsize + bp->ocount; 	case Binactive:		return 0;	}	fprint(2, "Bbuffered: unknown state %d\n", bp->state);	return 0;}