sort: Librarify getlines()

This commit is contained in:
Robert Ransom
2012-05-21 21:09:38 +00:00
parent 6a86755fee
commit 07b702d9a1
3 changed files with 9 additions and 24 deletions

8
text.h
View File

@@ -1,4 +1,12 @@
/* See LICENSE file for copyright and license details. */
struct linebuf {
char **lines;
long nlines;
long capacity;
};
#define EMPTY_LINEBUF {NULL, 0, 0,}
void getlines(FILE *, struct linebuf *);
char *afgets(char **, size_t *, FILE *);
void concat(FILE *, const char *, FILE *, const char *);