#ifndef BUF_H #define BUF_H #include typedef struct buf { size_t sz, cap; char *buf; } buf_t; void buf_init(buf_t *, size_t); void buf_grow(buf_t *, size_t); void buf_free(buf_t *); void buf_cat(buf_t *b, char *src, size_t n); void buf_catc(buf_t *b, char c); #endif