6 void _sizebuf2(void **buf, size_t *sz, size_t wanted, size_t el)
18 *buf = srealloc(*buf, n * el);
20 *buf = smalloc(n * el);
24 void _sizebuf(struct buffer *buf, size_t wanted, size_t el)
36 buf->b = srealloc(buf->b, n * el);
38 buf->b = smalloc(n * el);
42 char *vsprintf2(char *format, va_list al)
49 ret = vsnprintf(NULL, 0, format, al2);
51 buf = smalloc(ret + 1);
53 vsnprintf(buf, ret + 1, format, al2);
58 char *sprintf2(char *format, ...)
63 va_start(args, format);
64 buf = vsprintf2(format, args);