silc_buffer_sstrformat

SYNOPSIS

    int silc_buffer_strformat(SilcStack stack, SilcBuffer dst, ...);

DESCRIPTION

Formats a buffer from variable argument list of strings. Each string must be NULL-terminated and the variable argument list must be end with SILC_STRFMT_END argument. This allows that a string in the list can be NULL, in which case it is skipped. This automatically allocates the space for the buffer data but `dst' must be already allocated by the caller. This function is equivalent to silc_buffer_strformat but allocates memory from `stack'. Returns -1 if system is out of memory and sets silc_errno.

Note that this call consumes the `stack'. The caller should push the stack before calling the function and pop it later.