diff options
| author | Greg Hudson <ghudson@mit.edu> | 2008-10-28 22:03:35 +0000 |
|---|---|---|
| committer | Greg Hudson <ghudson@mit.edu> | 2008-10-28 22:03:35 +0000 |
| commit | 88cd11e1087decfebf0fd87e5243dab9efc9c686 (patch) | |
| tree | ce245e9c6298934b486d3cfa92557304639efaa6 /src/include | |
| parent | 886967fbb7889a6a2654b5256bb9bb442382ccde (diff) | |
| download | krb5-88cd11e1087decfebf0fd87e5243dab9efc9c686.tar.gz krb5-88cd11e1087decfebf0fd87e5243dab9efc9c686.tar.xz krb5-88cd11e1087decfebf0fd87e5243dab9efc9c686.zip | |
In the k5buf module, add a function to append formatted data to a
buffer.
ticket: 6200
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20932 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/k5-buf.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/include/k5-buf.h b/src/include/k5-buf.h index 2fe1d1d89..885c2fdc2 100644 --- a/src/include/k5-buf.h +++ b/src/include/k5-buf.h @@ -39,6 +39,7 @@ #define KRB5_CALLCONV_C #endif +#include <stdarg.h> #include <string.h> #include <unistd.h> @@ -81,6 +82,13 @@ void krb5int_buf_add(struct k5buf *buf, const char *data); output (use krb5int_buf_len to retrieve the length of the output). */ void krb5int_buf_add_len(struct k5buf *buf, const char *data, size_t len); +/* Add sprintf-style formatted data to BUF. */ +void krb5int_buf_add_fmt(struct k5buf *buf, const char *fmt, ...) +#if !defined(__cplusplus) && (__GNUC__ > 2) + __attribute__((__format__(__printf__, 2, 3))) +#endif + ; + /* Truncate BUF. LEN must be between 0 and the existing buffer length, or an assertion failure will result. */ void krb5int_buf_truncate(struct k5buf *buf, size_t len); |
