aboutsummaryrefslogtreecommitdiff
path: root/strbuf.h
diff options
context:
space:
mode:
Diffstat (limited to 'strbuf.h')
-rw-r--r--strbuf.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/strbuf.h b/strbuf.h
index 7829c63..28512f2 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -78,6 +78,11 @@ static inline void strbuf_reset(strbuf_t *s)
78 s->length = 0; 78 s->length = 0;
79} 79}
80 80
81static inline int strbuf_allocated(strbuf_t *s)
82{
83 return s->buf != NULL;
84}
85
81/* Return bytes remaining in the string buffer 86/* Return bytes remaining in the string buffer
82 * Ensure there is space for a NULL terminator. */ 87 * Ensure there is space for a NULL terminator. */
83static inline int strbuf_empty_length(strbuf_t *s) 88static inline int strbuf_empty_length(strbuf_t *s)