diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-06-18 00:22:37 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-06-18 00:22:37 +0000 |
commit | 993d1bce74f4cc5be2bfa69a467aae106e2194ab (patch) | |
tree | f281667fdbc6f643f4a799be75dcbd95102c0dc8 /src/strbuf.c | |
parent | eb946dbdbeda66b95039b1e5ada3b9006dc33c8c (diff) |
basic cli interface
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@22 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/strbuf.c')
-rw-r--r-- | src/strbuf.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/strbuf.c b/src/strbuf.c index 7c8b965d..97c451c1 100644 --- a/src/strbuf.c +++ b/src/strbuf.c @@ -1,6 +1,3 @@ -#ifndef foostrbufhfoo -#define foostrbufhfoo - #include <sys/types.h> #include <stdlib.h> #include <assert.h> @@ -55,6 +52,14 @@ char *strbuf_tostring(struct strbuf *sb) { return t; } +char *strbuf_tostring_free(struct strbuf *sb) { + char *t; + assert(sb); + t = strbuf_tostring(sb); + strbuf_free(sb); + return t; +} + void strbuf_puts(struct strbuf *sb, const char *t) { struct chunk *c; size_t l; @@ -118,5 +123,3 @@ int strbuf_printf(struct strbuf *sb, const char *format, ...) { size *= 2; } } - -#endif |