This patch from Adam Heath <doogie@debian.org>, makes print_file

(used by cat, grep, sed, etc) quite a bit faster.
This commit is contained in:
Eric Andersen
2001-05-15 17:48:09 +00:00
parent c911a4389b
commit 55f9872616
5 changed files with 72 additions and 6 deletions

View File

@ -26,12 +26,9 @@
extern void print_file(FILE *file)
{
int c;
while ((c = getc(file)) != EOF)
putc(c, stdout);
fclose(file);
fflush(stdout);
copyfd(fileno(file), fileno(stdout));
fclose(file);
}
extern int print_file_by_name(char *filename)