Lines Matching refs:b
56 void* b = realloc(buffer, newSize); in append() local
57 if (!b) return NO_MEMORY; in append()
58 buffer = (char*)b; in append()
70 void* b = realloc(buffer, 256); in restart() local
71 if (b) { in restart()
72 buffer = (char*)b; in restart()
165 BufferState* b = getBuffer(); in print() local
180 if (b->atFront) { in print()
181 if (b->indent > 0) { in print()
183 const char* prefix = stringForIndent(b->indent); in print()
184 err = b->append(prefix, strlen(prefix)); in print()
187 } else if (*(txt-1) == '\n' && !b->bundle) { in print()
208 err = b->append(first, txt-first); in print()
210 b->atFront = *(txt-1) == '\n'; in print()
215 if (b->atFront && !b->bundle) { in print()
217 vec.iov_base = b->buffer; in print()
218 vec.iov_len = b->bufferPos; in print()
221 b->restart(); in print()
231 BufferState* b = getBuffer(); in moveIndent() local
232 b->indent += delta; in moveIndent()
233 if (b->indent < 0) b->indent = 0; in moveIndent()
239 BufferState* b = getBuffer(); in pushBundle() local
240 b->bundle++; in pushBundle()
246 BufferState* b = getBuffer(); in popBundle() local
247 b->bundle--; in popBundle()
248 LOG_FATAL_IF(b->bundle < 0, in popBundle()
250 if (b->bundle < 0) b->bundle = 0; in popBundle()
252 if (b->bundle == 0) { in popBundle()
256 if (b->bufferPos > 0 && b->atFront) { in popBundle()
258 vec.iov_base = b->buffer; in popBundle()
259 vec.iov_len = b->bufferPos; in popBundle()
261 b->restart(); in popBundle()