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 168 of file stringbuffer.c.
170 int maxlen = (
s->capacity - (
s->str_end -
s->str_start));
177 len = vsnprintf(
s->str_end, maxlen,
fmt, ap2);
182 #if defined(__MINGW64_VERSION_MAJOR)
183 len = _vscprintf(
fmt, ap2);
194 maxlen = (
s->capacity - (
s->str_end -
s->str_start));
197 len = vsnprintf(
s->str_end, maxlen,
fmt, ap);
200 if ( len < 0 )
return len;
202 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().