summaryrefslogtreecommitdiffstats
path: root/runtime/stringbuf.h
diff options
context:
space:
mode:
authorTomas Heinrich <theinric@redhat.com>2013-03-20 19:13:59 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2013-04-09 17:20:29 +0200
commit9959f80ee64c0beb86338f94f41ef8a873ab38d1 (patch)
treea2525b7e2a46d1c1fae0c05247d9dc6104cc549a /runtime/stringbuf.h
parentc020cf51d14a9b80fbde9296ed4beb6d4c66e55e (diff)
downloadrsyslog-9959f80ee64c0beb86338f94f41ef8a873ab38d1.tar.gz
rsyslog-9959f80ee64c0beb86338f94f41ef8a873ab38d1.tar.bz2
rsyslog-9959f80ee64c0beb86338f94f41ef8a873ab38d1.zip
Add new string functions that take a printf-style fmt
Diffstat (limited to 'runtime/stringbuf.h')
-rw-r--r--runtime/stringbuf.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/stringbuf.h b/runtime/stringbuf.h
index bba004a0..b301f4b9 100644
--- a/runtime/stringbuf.h
+++ b/runtime/stringbuf.h
@@ -58,6 +58,7 @@ rsRetVal cstrConstruct(cstr_t **ppThis);
rsRetVal cstrConstructFromESStr(cstr_t **ppThis, es_str_t *str);
rsRetVal rsCStrConstructFromszStr(cstr_t **ppThis, uchar *sz);
rsRetVal rsCStrConstructFromCStr(cstr_t **ppThis, cstr_t *pFrom);
+rsRetVal rsCStrConstructFromszStrf(cstr_t **ppThis, uchar *fmt, ...);
/**
* Destruct the string buffer object.
@@ -173,6 +174,12 @@ rsRetVal rsCStrAppendStr(cstr_t *pThis, uchar* psz);
*/
rsRetVal rsCStrAppendStrWithLen(cstr_t *pThis, uchar* psz, size_t iStrLen);
+/**
+ * Append a printf-style formated string to the buffer.
+ *
+ * \param fmt pointer to the format string (see man 3 printf for details). Must not be NULL.
+ */
+rsRetVal rsCStrAppendStrf(cstr_t *pThis, uchar *fmt, ...);
/**
* Append an integer to the string. No special formatting is