Lines Matching refs:b
52 void* b = realloc(buffer, ((len+bufferPos)*3)/2); in append() local
53 if (!b) return NO_MEMORY; in append()
54 buffer = (char*)b; in append()
65 void* b = realloc(buffer, 256); in restart() local
66 if (b) { in restart()
67 buffer = (char*)b; in restart()
160 BufferState* b = getBuffer(); in print() local
175 if (b->atFront) { in print()
176 if (b->indent > 0) { in print()
178 const char* prefix = stringForIndent(b->indent); in print()
179 err = b->append(prefix, strlen(prefix)); in print()
182 } else if (*(txt-1) == '\n' && !b->bundle) { in print()
203 err = b->append(first, txt-first); in print()
205 b->atFront = *(txt-1) == '\n'; in print()
210 if (b->atFront && !b->bundle) { in print()
212 vec.iov_base = b->buffer; in print()
213 vec.iov_len = b->bufferPos; in print()
216 b->restart(); in print()
226 BufferState* b = getBuffer(); in moveIndent() local
227 b->indent += delta; in moveIndent()
228 if (b->indent < 0) b->indent = 0; in moveIndent()
234 BufferState* b = getBuffer(); in pushBundle() local
235 b->bundle++; in pushBundle()
241 BufferState* b = getBuffer(); in popBundle() local
242 b->bundle--; in popBundle()
243 LOG_FATAL_IF(b->bundle < 0, in popBundle()
245 if (b->bundle < 0) b->bundle = 0; in popBundle()
247 if (b->bundle == 0) { in popBundle()
251 if (b->bufferPos > 0 && b->atFront) { in popBundle()
253 vec.iov_base = b->buffer; in popBundle()
254 vec.iov_len = b->bufferPos; in popBundle()
256 b->restart(); in popBundle()