summaryrefslogtreecommitdiffstats
path: root/src/strbuf.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/strbuf.h')
-rw-r--r--src/strbuf.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/strbuf.h b/src/strbuf.h
new file mode 100644
index 0000000..d04c2aa
--- /dev/null
+++ b/src/strbuf.h
@@ -0,0 +1,12 @@
+#include <stdlib.h>
+
+struct strbuf {
+ char *buf;
+ size_t cap;
+};
+
+void strbuf_init(struct strbuf *strbuf);
+void strbuf_deinit(struct strbuf *strbuf);
+
+void strbuf_clear(struct strbuf *strbuf);
+void strbuf_append(struct strbuf *strbuf, const char *fmt, ...);