From 88cd11e1087decfebf0fd87e5243dab9efc9c686 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Tue, 28 Oct 2008 22:03:35 +0000 Subject: 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 --- src/include/k5-buf.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/include') 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 #include #include @@ -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); -- cgit