Lines Matching refs:size
39 p->size = 32; in printbuf_new()
41 if(!(p->buf = (char*)malloc(p->size))) { in printbuf_new()
62 if (p->size >= min_size) in printbuf_extend()
65 new_size = p->size * 2; in printbuf_extend()
71 p->bpos, min_size, p->size, new_size); in printbuf_extend()
75 p->size = new_size; in printbuf_extend()
80 int printbuf_memappend(struct printbuf *p, const char *buf, int size) in printbuf_memappend() argument
82 if (p->size <= p->bpos + size + 1) { in printbuf_memappend()
83 if (printbuf_extend(p, p->bpos + size + 1) < 0) in printbuf_memappend()
86 memcpy(p->buf + p->bpos, buf, size); in printbuf_memappend()
87 p->bpos += size; in printbuf_memappend()
89 return size; in printbuf_memappend()
99 if (pb->size < size_needed) in printbuf_memset()
157 int size; in sprintbuf() local
162 size = vsnprintf(buf, 128, msg, ap); in sprintbuf()
168 if(size == -1 || size > 127) { in sprintbuf()
170 if((size = vasprintf(&t, msg, ap)) < 0) { va_end(ap); return -1; } in sprintbuf()
172 printbuf_memappend(p, t, size); in sprintbuf()
174 return size; in sprintbuf()
176 printbuf_memappend(p, buf, size); in sprintbuf()
177 return size; in sprintbuf()