Appends a formatted string to the current string buffer, using the format and argument list provided.
Returns -1 on error, check errno for reasons, documented in the printf man page.
Definition at line 204 of file stringbuffer.c.
206 int maxlen = (
s->capacity - (
s->str_end -
s->str_start));
213 len = vsnprintf(
s->str_end, maxlen,
fmt, ap2);
218 #if defined(__MINGW64_VERSION_MAJOR)
219 len = _vscprintf(
fmt, ap2);
230 maxlen = (
s->capacity - (
s->str_end -
s->str_start));
233 len = vsnprintf(
s->str_end, maxlen,
fmt, ap);
236 if ( len < 0 )
return len;
238 if ( len >= maxlen )
return -1;
static void stringbuffer_makeroom(stringbuffer_t *s, size_t size_to_add)
If necessary, expand the stringbuffer_t internal buffer to accommodate the specified additional size.
References pixval::fmt, s, and stringbuffer_makeroom().
Referenced by stringbuffer_aprintf().