diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-10-01 15:41:27 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-10-01 15:41:27 +0000 |
commit | 997e6dd0d5f6f99b50dc88f06319e027530589f8 (patch) | |
tree | 72102d76a9b39e80750a94d47b4cf7d6061d7841 /include | |
parent | 5f810e050b3d9bcc691f457561ea0c710d88c4b4 (diff) |
add ast_build_string_va(), which accepts a varargs list directly
ensure the _entire_ manager_event() output is either queued or sent via ast_carefulwrite()
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6708 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rwxr-xr-x | include/asterisk/strings.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/asterisk/strings.h b/include/asterisk/strings.h index e0e5148a3..508a3ba7e 100755 --- a/include/asterisk/strings.h +++ b/include/asterisk/strings.h @@ -174,6 +174,20 @@ void ast_copy_string(char *dst, const char *src, size_t size), */ int ast_build_string(char **buffer, size_t *space, const char *fmt, ...) __attribute__ ((format (printf, 3, 4))); +/*! + \brief Build a string in a buffer, designed to be called repeatedly + + This is a wrapper for snprintf, that properly handles the buffer pointer + and buffer space available. + + \return 0 on success, non-zero on failure. + \param buffer current position in buffer to place string into (will be updated on return) + \param space remaining space in buffer (will be updated on return) + \param fmt printf-style format string + \param ap varargs list of arguments for format +*/ +int ast_build_string_va(char **buffer, size_t *space, const char *fmt, va_list ap); + /*! Make sure something is true */ /*! * Determine if a string containing a boolean value is "true". |