Archived
1
Fork 0
This repository has been archived on 2024-10-07. You can view files and clone it, but cannot push or open issues or pull requests.
kilo/include/append_buf.h

16 lines
316 B
C
Raw Normal View History

2023-08-31 05:48:27 +00:00
#ifndef APPEND_BUF_H
#define APPEND_BUF_H
// A simple append only buffer to build strings
struct append_buf {
char *chars;
int n_chars;
};
struct append_buf *ab_init(void);
void ab_append(struct append_buf *ab, const char *chars, int n_chars);
void ab_free(struct append_buf *ab);
#endif // APPEND_BUF_H