Rename struct linebufline to struct line and add linecmp()

This simplifies the handling in sort(1) and comm(1) quite a bit.
This commit is contained in:
FRIGN
2016-03-07 02:04:29 +01:00
committed by sin
parent 54d3f3b3a5
commit 0fa5a3e5bb
4 changed files with 17 additions and 22 deletions

5
text.h
View File

@@ -1,12 +1,12 @@
/* See LICENSE file for copyright and license details. */
struct linebufline {
struct line {
char *data;
size_t len;
};
struct linebuf {
struct linebufline *lines;
struct line *lines;
size_t nlines;
size_t capacity;
};
@@ -14,3 +14,4 @@ struct linebuf {
void getlines(FILE *, struct linebuf *);
void concat(FILE *, const char *, FILE *, const char *);
int linecmp(struct line *, struct line *);