1 /* variable length string buffer */
3 char *s
; /* allocated buffer */
4 int sz
; /* buffer size */
5 int n
; /* length of the string stored in s */
8 void sbuf_init(struct sbuf
*sbuf
);
9 void sbuf_done(struct sbuf
*sbuf
);
10 char *sbuf_buf(struct sbuf
*sbuf
);
11 void sbuf_printf(struct sbuf
*sbuf
, char *s
, ...);
12 int sbuf_empty(struct sbuf
*sbuf
);