summaryrefslogtreecommitdiffstats
path: root/membuffer.h
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2014-03-07 09:46:17 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-03-07 16:36:11 -0800
commit0b8deb2a15d4785fb8bd6cd67a913ecd4d8e02c8 (patch)
tree89c2f21f01a1602ef0afec52155a7e51439a95a7 /membuffer.h
parent4edf37f9be0374c73ae957c09b393f5bc913fe3f (diff)
downloadsubsurface-0b8deb2a15d4785fb8bd6cd67a913ecd4d8e02c8.tar.gz
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>
Diffstat (limited to 'membuffer.h')
-rw-r--r--membuffer.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/membuffer.h b/membuffer.h
index 2a6ddc7f5..3a7f633be 100644
--- a/membuffer.h
+++ b/membuffer.h
@@ -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, ...);