X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcutil%2Fsilcbuffmt.h;h=c76213657d202345933e5f3f3c74e4368fbcaf1d;hb=6c9605462e4f9210558e97ed4929d8ab0d59f2d9;hp=5401a217170a2e9ce5236fec0bb2da3a61923f10;hpb=0a05f5b5dd6ba2eb0fa580f0dda53c4fcc933cca;p=silc.git diff --git a/lib/silcutil/silcbuffmt.h b/lib/silcutil/silcbuffmt.h index 5401a217..c7621365 100644 --- a/lib/silcutil/silcbuffmt.h +++ b/lib/silcutil/silcbuffmt.h @@ -249,8 +249,8 @@ int silc_buffer_format(SilcBuffer dst, ...); * * DESCRIPTION * - * Formats a buffer from a variable argument list. Returns -1 on error - * and the length of the formatted buffer otherwise. + * Unformats a buffer from a variable argument list. Returns -1 on error + * and the length of the unformatted buffer otherwise. * ***/ int silc_buffer_unformat(SilcBuffer src, ...); @@ -277,10 +277,28 @@ int silc_buffer_format_vp(SilcBuffer dst, va_list ap); * * DESCRIPTION * - * Formats a buffer from a variable argument list indicated by the `ap'. - * Returns -1 on error and the length of the formatted buffer otherwise. + * Unformats a buffer from a variable argument list indicated by the `ap'. + * Returns -1 on error and the length of the unformatted buffer otherwise. * ***/ int silc_buffer_unformat_vp(SilcBuffer src, va_list ap); +/****f* silcutil/SilcBufferFormatAPI/silc_buffer_strformat + * + * SYNOPSIS + * + * int silc_buffer_strformat(SilcBuffer dst, ...); + * + * DESCRIPTION + * + * Formats a buffer from variable argument list of strings. Eachs + * string must be NULL-terminated and the variable argument list must + * be end with SILC_STR_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. + * + ***/ +int silc_buffer_strformat(SilcBuffer dst, ...); + #endif /* !SILCBUFFMT_H */