6 Bseek(Biobufhdr *bp, vlong offset, int base)
12 fprint(2, "Bseek: unknown state %d\n", bp->state);
28 * try to seek within buffer
32 * if d is too large for an int, icount may wrap,
33 * so we need to ensure that icount hasn't wrapped
34 * and points within the buffer's valid data.
38 if(d <= bp->bsize && bp->icount <= 0 &&
39 bp->ebuf - bp->gbuf >= -bp->icount)
46 n = seek(bp->fid, n, base);
53 n = seek(bp->fid, offset, base);