Lines Matching defs:strbuf
11 * 1. the ->buf member is always malloc-ed, hence strbuf's can be used to
20 * member to be a valid C-string. Every strbuf function ensure this
35 * missing API to the strbuf module is the way to go.
50 struct strbuf {
58 /*----- strbuf life cycle -----*/
59 int strbuf_init(struct strbuf *buf, ssize_t hint);
60 void strbuf_release(struct strbuf *buf);
61 char *strbuf_detach(struct strbuf *buf, size_t *);
63 /*----- strbuf size related -----*/
64 static inline ssize_t strbuf_avail(const struct strbuf *sb) {
68 int strbuf_grow(struct strbuf *buf, size_t);
70 static inline int strbuf_setlen(struct strbuf *sb, size_t len) {
83 int strbuf_addch(struct strbuf *sb, int c);
85 int strbuf_add(struct strbuf *buf, const void *, size_t);
86 static inline int strbuf_addstr(struct strbuf *sb, const char *s) {
90 int strbuf_addf(struct strbuf *sb, const char *fmt, ...) __printf(2, 3);
93 ssize_t strbuf_read(struct strbuf *, int fd, ssize_t hint);