You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
448 B
16 lines
448 B
3 years ago
|
#ifndef F2B_BUF_H_
|
||
|
#define F2B_BUF_H_
|
||
|
|
||
|
typedef struct f2b_buf_t {
|
||
|
size_t used; /**< bytes used in buffer */
|
||
|
size_t size; /**< available size in data */
|
||
|
char *data; /**< allocated buffer */
|
||
|
} f2b_buf_t;
|
||
|
|
||
|
bool f2b_buf_alloc(f2b_buf_t *buf, size_t max);
|
||
|
void f2b_buf_free(f2b_buf_t *buf);
|
||
|
bool f2b_buf_append(f2b_buf_t *buf, const char *str, size_t size);
|
||
|
char * f2b_buf_extract(f2b_buf_t *buf, const char *end);
|
||
|
|
||
|
#endif /* F2B_BUF_H_ */
|