aboutsummaryrefslogtreecommitdiff
#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 */