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
util.h
View File

@@ -64,6 +64,7 @@ int eregcomp(regex_t *, const char *, int);
/* io */
ssize_t writeall(int, const void *, size_t);
int concat(int, const char *, int, const char *);
/* misc */
void enmasse(int, char **, int (*)(const char *, const char *, int));