mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
87ee8e8aef
commit
12f422a1a3
2 changed files with 31 additions and 0 deletions
|
@ -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 *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue