Lines Matching refs:b
55 void* b = realloc(buffer, newSize); in append() local
56 if (!b) return NO_MEMORY; in append()
57 buffer = (char*)b; in append()
69 void* b = realloc(buffer, 256); in restart() local
70 if (b) { in restart()
71 buffer = (char*)b; in restart()
148 BufferState* b = getBuffer(); in print() local
163 if (b->atFront) { in print()
164 if (b->indent > 0) { in print()
166 const char* prefix = stringForIndent(b->indent); in print()
167 err = b->append(prefix, strlen(prefix)); in print()
170 } else if (*(txt-1) == '\n' && !b->bundle) { in print()
191 err = b->append(first, txt-first); in print()
193 b->atFront = *(txt-1) == '\n'; in print()
198 if (b->atFront && !b->bundle) { in print()
200 vec.iov_base = b->buffer; in print()
201 vec.iov_len = b->bufferPos; in print()
204 b->restart(); in print()
214 BufferState* b = getBuffer(); in moveIndent() local
215 b->indent += delta; in moveIndent()
216 if (b->indent < 0) b->indent = 0; in moveIndent()
222 BufferState* b = getBuffer(); in pushBundle() local
223 b->bundle++; in pushBundle()
229 BufferState* b = getBuffer(); in popBundle() local
230 b->bundle--; in popBundle()
231 LOG_FATAL_IF(b->bundle < 0, in popBundle()
233 if (b->bundle < 0) b->bundle = 0; in popBundle()
235 if (b->bundle == 0) { in popBundle()
239 if (b->bufferPos > 0 && b->atFront) { in popBundle()
241 vec.iov_base = b->buffer; in popBundle()
242 vec.iov_len = b->bufferPos; in popBundle()
244 b->restart(); in popBundle()