Lines Matching refs:b
58 void* b = realloc(buffer, newSize); in append() local
59 if (!b) return NO_MEMORY; in append()
60 buffer = (char*)b; in append()
72 void* b = realloc(buffer, 256); in restart() local
73 if (b) { in restart()
74 buffer = (char*)b; in restart()
149 BufferState* b = getBuffer(); in print() local
162 if (b->atFront) { in print()
163 if (b->indent > 0) { in print()
165 const char* prefix = stringForIndent(b->indent); in print()
166 err = b->append(prefix, strlen(prefix)); in print()
168 } else if (*(txt-1) == '\n' && !b->bundle) { in print()
189 err = b->append(first, txt-first); in print()
191 b->atFront = *(txt-1) == '\n'; in print()
196 if (b->atFront && !b->bundle) { in print()
198 vec.iov_base = b->buffer; in print()
199 vec.iov_len = b->bufferPos; in print()
202 b->restart(); in print()
212 BufferState* b = getBuffer(); in moveIndent() local
213 b->indent += delta; in moveIndent()
214 if (b->indent < 0) b->indent = 0; in moveIndent()
220 BufferState* b = getBuffer(); in pushBundle() local
221 b->bundle++; in pushBundle()
227 BufferState* b = getBuffer(); in popBundle() local
228 b->bundle--; in popBundle()
229 LOG_FATAL_IF(b->bundle < 0, in popBundle()
231 if (b->bundle < 0) b->bundle = 0; in popBundle()
233 if (b->bundle == 0) { in popBundle()
237 if (b->bufferPos > 0 && b->atFront) { in popBundle()
239 vec.iov_base = b->buffer; in popBundle()
240 vec.iov_len = b->bufferPos; in popBundle()
242 b->restart(); in popBundle()