Lines Matching refs:buf
41 if(!(p->buf = (char*)malloc(p->size))) { in printbuf_new()
73 if(!(t = (char*)realloc(p->buf, new_size))) in printbuf_extend()
76 p->buf = t; in printbuf_extend()
80 int printbuf_memappend(struct printbuf *p, const char *buf, int size) in printbuf_memappend() argument
86 memcpy(p->buf + p->bpos, buf, size); in printbuf_memappend()
88 p->buf[p->bpos]= '\0'; in printbuf_memappend()
105 memset(pb->buf + offset, charvalue, len); in printbuf_memset()
120 static int vasprintf(char **buf, const char *fmt, va_list ap) in vasprintf() argument
128 if(!buf) { return -1; } in vasprintf()
146 *buf = b; in vasprintf()
158 char buf[128]; in sprintbuf() local
162 size = vsnprintf(buf, 128, msg, ap); in sprintbuf()
176 printbuf_memappend(p, buf, size); in sprintbuf()
183 p->buf[0] = '\0'; in printbuf_reset()
190 free(p->buf); in printbuf_free()