Lines Matching refs:bp
107 Buf_Expand_1(Buffer *bp)
109 bp->size += max(bp->size, 16);
110 bp->buffer = bmake_realloc(bp->buffer, bp->size);
127 Buf_AddBytes(Buffer *bp, int numBytes, const Byte *bytesPtr)
129 int count = bp->count;
132 if (__predict_false(count + numBytes >= bp->size)) {
133 bp->size += max(bp->size, numBytes + 16);
134 bp->buffer = bmake_realloc(bp->buffer, bp->size);
137 ptr = bp->buffer + count;
138 bp->count = count + numBytes;
157 Buf_GetAll(Buffer *bp, int *numBytesPtr)
161 *numBytesPtr = bp->count;
163 return (bp->buffer);
180 Buf_Empty(Buffer *bp)
183 bp->count = 0;
184 *bp->buffer = 0;
206 Buf_Init(Buffer *bp, int size)
211 bp->size = size;
212 bp->count = 0;
213 bp->buffer = bmake_malloc(size);
214 *bp->buffer = 0;