Lines Matching refs:bp
149 register struct buf *bp;
166 bp = bufnode_buf(ch_bufhead);
167 if (ch_block == bp->block && ch_offset < bp->datasize)
168 return bp->data[ch_offset];
179 bp = bufnode_buf(bn);
180 if (bp->block == ch_block)
182 if (ch_offset >= bp->datasize)
217 bp = bufnode_buf(bn);
219 bp->block = ch_block;
220 bp->datasize = 0;
225 pos = (ch_block * LBUFSIZE) + bp->datasize;
257 bp->data[bp->datasize] = ch_ungotchar;
262 bp->data[bp->datasize] = helpdata[ch_fpos];
266 n = iread(ch_file, &bp->data[bp->datasize],
267 (unsigned int)(LBUFSIZE - bp->datasize));
289 write(logfile, (char *) &bp->data[bp->datasize], n);
293 bp->datasize += n;
366 if (ch_offset >= bp->datasize)
373 return (bp->data[ch_offset]);
422 register struct buf *bp;
434 bp = bufnode_buf(bn);
435 if (bp->block == block)
437 write(logfile, (char *) bp->data, bp->datasize);
460 register struct buf *bp;
467 bp = bufnode_buf(bn);
468 if (bp->block == block)
547 register struct buf *bp;
558 bp = bufnode_buf(bn);
559 buf_pos = (bp->block * LBUFSIZE) + bp->datasize;
765 register struct buf *bp;
772 bp = (struct buf *) calloc(1, sizeof(struct buf));
773 if (bp == NULL)
776 bp->block = -1;
777 bn = &bp->node;
948 struct buf *bp;
963 bp = bufnode_buf(bn);
965 bp, bp->block, bp->datasize);
966 for (s = bp->data; s < bp->data + 30; s++)