2011-05-25 19:40:47 +00:00
|
|
|
/* See LICENSE file for copyright and license details. */
|
|
|
|
|
2016-03-07 01:04:29 +00:00
|
|
|
struct line {
|
2016-02-28 23:45:53 +00:00
|
|
|
char *data;
|
|
|
|
size_t len;
|
|
|
|
};
|
|
|
|
|
2012-05-21 21:09:38 +00:00
|
|
|
struct linebuf {
|
2016-03-07 01:04:29 +00:00
|
|
|
struct line *lines;
|
2015-01-31 19:57:29 +00:00
|
|
|
size_t nlines;
|
|
|
|
size_t capacity;
|
2012-05-21 21:09:38 +00:00
|
|
|
};
|
|
|
|
#define EMPTY_LINEBUF {NULL, 0, 0,}
|
|
|
|
void getlines(FILE *, struct linebuf *);
|
|
|
|
|
2016-03-07 01:04:29 +00:00
|
|
|
int linecmp(struct line *, struct line *);
|