diff options
Diffstat (limited to 'string_buf.h')
-rw-r--r-- | string_buf.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/string_buf.h b/string_buf.h new file mode 100644 index 0000000..8337e12 --- /dev/null +++ b/string_buf.h @@ -0,0 +1,25 @@ +#ifndef STRING_BUF_H +#define STRING_BUF_H + +int extend_buf(char **buf, size_t *buf_len, size_t *buf_filled, + size_t extend_len); + +int sb_bytes(char **buf, size_t *buf_len, size_t *buf_filled, + const unsigned char *bytes, size_t bytes_len); + +int sb_string(char **buf, size_t *buf_len, size_t *buf_filled, + const char *string); + +int sb_char(char **buf, size_t *buf_len, size_t *buf_filled, char c); + +int sb_num(char **buf, size_t *buf_len, size_t *buf_filled, long num); + +int sb_vsprintf(char **buf, size_t *buf_len, size_t *buf_filled, + const char *fmt, va_list ap); + +int sb_sprintf(char **buf, size_t *buf_len, size_t *buf_filled, + const char *fmt, ...); + +int crop_buf(char **buf, size_t *buf_len, size_t *buf_filled); + +#endif /* STRING_BUF_H */ |