sbase/text.h
FRIGN 0fa5a3e5bb Rename struct linebufline to struct line and add linecmp()
This simplifies the handling in sort(1) and comm(1) quite a bit.
2016-03-10 08:48:09 +00:00

18 lines
356 B
C

/* See LICENSE file for copyright and license details. */
struct line {
char *data;
size_t len;
};
struct linebuf {
struct line *lines;
size_t nlines;
size_t capacity;
};
#define EMPTY_LINEBUF {NULL, 0, 0,}
void getlines(FILE *, struct linebuf *);
void concat(FILE *, const char *, FILE *, const char *);
int linecmp(struct line *, struct line *);