Lines Matching refs:size
39 p->size = 32;
41 if(!(p->buf = (char*)malloc(p->size))) {
50 * Extend the buffer p so it has a size of at least min_size.
52 * If the current size is large enough, nothing is changed.
62 if (p->size >= min_size)
65 new_size = p->size * 2;
71 p->bpos, min_size, p->size, new_size);
75 p->size = new_size;
80 int printbuf_memappend(struct printbuf *p, const char *buf, int size)
82 if (p->size <= p->bpos + size + 1) {
83 if (printbuf_extend(p, p->bpos + size + 1) < 0)
86 memcpy(p->buf + p->bpos, buf, size);
87 p->bpos += size;
89 return size;
99 if (pb->size < size_needed)
157 int size;
162 size = vsnprintf(buf, 128, msg, ap);
168 if(size == -1 || size > 127) {
170 if((size = vasprintf(&t, msg, ap)) < 0) { va_end(ap); return -1; }
172 printbuf_memappend(p, t, size);
174 return size;
176 printbuf_memappend(p, buf, size);
177 return size;