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 201 of file stringbuffer.c.
203 int maxlen = (
s->capacity - (
s->str_end -
s->str_start));
210 len = vsnprintf(
s->str_end, maxlen,
fmt, ap2);
215 #if defined(__MINGW64_VERSION_MAJOR)
218 len = _vscprintf(
fmt, ap2);
231 maxlen = (
s->capacity - (
s->str_end -
s->str_start));
234 len = vsnprintf(
s->str_end, maxlen,
fmt, ap);
237 if ( len < 0 )
return len;
239 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().