diff options
author | Wojtek Kosior <wk@koszkonutek-tmp.pl.eu.org> | 2021-04-30 18:47:09 +0200 |
---|---|---|
committer | Wojtek Kosior <wk@koszkonutek-tmp.pl.eu.org> | 2021-04-30 18:47:09 +0200 |
commit | 35a201cc8ef0c3f5b2df88d2e528aabee1048348 (patch) | |
tree | 902dae955480e19f4498dbe4964619fc91d09b06 /string_buf.h | |
download | xml-backup-restore-master.tar.gz xml-backup-restore-master.zip |
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 */ |