diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-02-14 17:48:19 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-02-14 17:50:03 -0800 |
commit | 12f422a1a3468d5c29e99bb2c388248680227025 (patch) | |
tree | 609f354541af59997377beb78d8b487b57528b73 /membuffer.h | |
parent | 87ee8e8aef00f2e183c57a93754717ea41da9179 (diff) | |
download | subsurface-12f422a1a3468d5c29e99bb2c388248680227025.tar.gz |
Add helper function to extend C strings
This is trivial to do with Qt, but when we want to be able to do this in C
code it takes a little more work. This creates a simple pattern to extend
an existing C string.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'membuffer.h')
-rw-r--r-- | membuffer.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/membuffer.h b/membuffer.h index 153815fd8..c0a4f6029 100644 --- a/membuffer.h +++ b/membuffer.h @@ -27,6 +27,8 @@ extern void strip_mb(struct membuffer *); extern const char *mb_cstring(struct membuffer *); extern __printf(2, 0) void put_vformat(struct membuffer *, const char *, va_list); extern __printf(2, 3) void put_format(struct membuffer *, const char *fmt, ...); +extern __printf(2, 0) char *add_to_string_va(const char *old, const char *fmt, va_list args); +extern __printf(2, 3) char *add_to_string(const char *old, const char *fmt, ...); /* Output one of our "milli" values with type and pre/post data */ extern void put_milli(struct membuffer *, const char *, int, const char *); |