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:
5
text.h
5
text.h
@@ -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 *);
|
||||
|
Reference in New Issue
Block a user