strbuf.h (258B)
1#include <stdlib.h> 2 3struct strbuf { 4 char *buf; 5 size_t cap; 6}; 7 8void strbuf_init(struct strbuf *strbuf); 9void strbuf_deinit(struct strbuf *strbuf); 10 11void strbuf_clear(struct strbuf *strbuf); 12void strbuf_append(struct strbuf *strbuf, const char *fmt, ...);