[Asterisk-cvs] asterisk/include/asterisk strings.h,1.10,1.11

kpfleming kpfleming
Sat Oct 1 11:45:18 CDT 2005


Update of /usr/cvsroot/asterisk/include/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv28615/include/asterisk

Modified Files:
	strings.h 
Log Message:
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()


Index: strings.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/strings.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- strings.h	14 Sep 2005 02:30:33 -0000	1.10
+++ strings.h	1 Oct 2005 15:41:27 -0000	1.11
@@ -174,6 +174,20 @@
 */
 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".




More information about the svn-commits mailing list