concat: Use plain read/write instead of buffered stdio

If we are just copying data from one file to another, we don't need to
fill a complete buffer, just read a chunk at a time, and write it to the
output.
This commit is contained in:
Michael Forney
2017-07-03 14:58:49 -07:00
committed by Anselm R Garbe
parent 9a3b12525b
commit 3276fbea1c
8 changed files with 202 additions and 171 deletions

1
text.h
View File

@@ -13,5 +13,4 @@ struct linebuf {
#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 *);