Lines Matching refs:b
59 void* b = realloc(buffer, newSize); in append() local
60 if (!b) return NO_MEMORY; in append()
61 buffer = (char*)b; in append()
73 void* b = realloc(buffer, 256); in restart() local
74 if (b) { in restart()
75 buffer = (char*)b; in restart()
166 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()
185 } else if (*(txt-1) == '\n' && !b->bundle) { in print()
206 err = b->append(first, txt-first); in print()
208 b->atFront = *(txt-1) == '\n'; in print()
213 if (b->atFront && !b->bundle) { in print()
215 vec.iov_base = b->buffer; in print()
216 vec.iov_len = b->bufferPos; in print()
219 b->restart(); in print()
229 BufferState* b = getBuffer(); in moveIndent() local
230 b->indent += delta; in moveIndent()
231 if (b->indent < 0) b->indent = 0; in moveIndent()
237 BufferState* b = getBuffer(); in pushBundle() local
238 b->bundle++; in pushBundle()
244 BufferState* b = getBuffer(); in popBundle() local
245 b->bundle--; in popBundle()
246 LOG_FATAL_IF(b->bundle < 0, in popBundle()
248 if (b->bundle < 0) b->bundle = 0; in popBundle()
250 if (b->bundle == 0) { in popBundle()
254 if (b->bufferPos > 0 && b->atFront) { in popBundle()
256 vec.iov_base = b->buffer; in popBundle()
257 vec.iov_len = b->bufferPos; in popBundle()
259 b->restart(); in popBundle()