Fix and clarify gnuf_printf

This commit is contained in:
Nils O. Selåsdal
2012-11-18 14:04:57 +01:00
parent 65a6c67277
commit 9bf56c1756
3 changed files with 54 additions and 5 deletions
+5 -2
View File
@@ -59,13 +59,16 @@ void uc_gbuf_unref(GBuf *buf);
int uc_gbuf_append(GBuf *buf,const void *data,size_t len);
/** Do printf formatting on a GBuf.
* The buffer will grow as needed.
* The buffer will grow as needed,
* The buffer ensures that the added string will be nul terminated,
* however the nul terminator is not counted in the ->used member.
*
* @param buf The GBuf
* @param fmt printf stype formatting string
* @param ... format arguments
*
* @return The number of chars written, or negative if an error occurs
* @return The number of chars written excluding the terminating nul
* character , or negative if an error occurs
*/
int uc_gbuf_printf(GBuf *buf, const char *fmt, ...);