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()
164 BufferState* b = getBuffer(); in print() local
179 if (b->atFront) { in print()
180 if (b->indent > 0) { in print()
182 const char* prefix = stringForIndent(b->indent); in print()
183 err = b->append(prefix, strlen(prefix)); in print()
186 } else if (*(txt-1) == '\n' && !b->bundle) { in print()
207 err = b->append(first, txt-first); in print()
209 b->atFront = *(txt-1) == '\n'; in print()
214 if (b->atFront && !b->bundle) { in print()
216 vec.iov_base = b->buffer; in print()
217 vec.iov_len = b->bufferPos; in print()
220 b->restart(); in print()
230 BufferState* b = getBuffer(); in moveIndent() local
231 b->indent += delta; in moveIndent()
232 if (b->indent < 0) b->indent = 0; in moveIndent()
238 BufferState* b = getBuffer(); in pushBundle() local
239 b->bundle++; in pushBundle()
245 BufferState* b = getBuffer(); in popBundle() local
246 b->bundle--; in popBundle()
247 LOG_FATAL_IF(b->bundle < 0, in popBundle()
249 if (b->bundle < 0) b->bundle = 0; in popBundle()
251 if (b->bundle == 0) { in popBundle()
255 if (b->bufferPos > 0 && b->atFront) { in popBundle()
257 vec.iov_base = b->buffer; in popBundle()
258 vec.iov_len = b->bufferPos; in popBundle()
260 b->restart(); in popBundle()