diff options
author | Werner Koch <[email protected]> | 2013-11-29 14:37:23 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2013-11-29 14:37:23 +0000 |
commit | 159d42ee6ab21d97f40ee129445f37209b875739 (patch) | |
tree | 7fa321e6669177a4db5c76594d2752a778d3fffa /common/membuf.h | |
parent | Add rendered versions of the gnupg logo to artwork. (diff) | |
download | gnupg-159d42ee6ab21d97f40ee129445f37209b875739.tar.gz gnupg-159d42ee6ab21d97f40ee129445f37209b875739.zip |
common: Add put_membuf_printf.
* common/membuf.c (put_membuf_printf): New.
--
This is just a convenience function for easier code readability.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'common/membuf.h')
-rw-r--r-- | common/membuf.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/membuf.h b/common/membuf.h index a76c1be2e..bf4cf3687 100644 --- a/common/membuf.h +++ b/common/membuf.h @@ -30,6 +30,8 @@ #ifndef GNUPG_COMMON_MEMBUF_H #define GNUPG_COMMON_MEMBUF_H +#include "mischelp.h" + /* The definition of the structure is private, we only need it here, so it can be allocated on the stack. */ struct private_membuf_s @@ -52,6 +54,8 @@ void init_membuf_secure (membuf_t *mb, int initiallen); void clear_membuf (membuf_t *mb, size_t amount); void put_membuf (membuf_t *mb, const void *buf, size_t len); void put_membuf_str (membuf_t *mb, const char *string); +void put_membuf_printf (membuf_t *mb, const char *format, + ...) JNLIB_GCC_A_PRINTF(2,3); void *get_membuf (membuf_t *mb, size_t *len); const void *peek_membuf (membuf_t *mb, size_t *len); |