1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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 */
|