diff options
Diffstat (limited to 'strbuf.h')
-rw-r--r-- | strbuf.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -70,6 +70,7 @@ static char *strbuf_string(strbuf_t *s, int *len); | |||
70 | static void strbuf_ensure_empty_length(strbuf_t *s, int len); | 70 | static void strbuf_ensure_empty_length(strbuf_t *s, int len); |
71 | static char *strbuf_empty_ptr(strbuf_t *s); | 71 | static char *strbuf_empty_ptr(strbuf_t *s); |
72 | static void strbuf_extend_length(strbuf_t *s, int len); | 72 | static void strbuf_extend_length(strbuf_t *s, int len); |
73 | static void strbuf_set_length(strbuf_t *s, int len); | ||
73 | 74 | ||
74 | /* Update */ | 75 | /* Update */ |
75 | extern void strbuf_append_fmt(strbuf_t *s, int len, const char *fmt, ...); | 76 | extern void strbuf_append_fmt(strbuf_t *s, int len, const char *fmt, ...); |
@@ -108,6 +109,11 @@ static inline char *strbuf_empty_ptr(strbuf_t *s) | |||
108 | return s->buf + s->length; | 109 | return s->buf + s->length; |
109 | } | 110 | } |
110 | 111 | ||
112 | static inline void strbuf_set_length(strbuf_t *s, int len) | ||
113 | { | ||
114 | s->length = len; | ||
115 | } | ||
116 | |||
111 | static inline void strbuf_extend_length(strbuf_t *s, int len) | 117 | static inline void strbuf_extend_length(strbuf_t *s, int len) |
112 | { | 118 | { |
113 | s->length += len; | 119 | s->length += len; |