2 * Sherlock Library -- auto-resizable printf() functions
4 * (c) 2002, Robert Spalek <robert@ucw.cz>
6 * This software may be freely distributed and used according to the terms
7 * of the GNU Lesser General Public License.
11 #include "lib/printf.h"
16 vxprintf(char *msg, va_list v)
18 static byte *buf = NULL;
19 static int buf_len = 0;
24 buf = xmalloc(buf_len);
28 len = vsnprintf(buf, buf_len, msg, v);
29 if (len >= 0 && len < buf_len)
36 buf = xrealloc(buf, buf_len);
42 xprintf(char *msg, ...)
47 txt = vxprintf(msg, v);