mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add C string helper to membuffer interface
I don't know why I didn't do this from the beginning. We often build up a membuffer and then want to use it as a C string. You could do it by hand by adding the zero byte at the end, but that's just annoying. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4edf37f9be
commit
0b8deb2a15
2 changed files with 8 additions and 0 deletions
|
@ -23,6 +23,7 @@ extern void flush_buffer(struct membuffer *, FILE *);
|
|||
extern void put_bytes(struct membuffer *, const char *, int);
|
||||
extern void put_string(struct membuffer *, const char *);
|
||||
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, ...);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue