ed: Use fwrite to write lines instead of fputs

We already have the length of the line, so there is no point in
recalculating it before printing.
This commit is contained in:
Michael Forney 2020-09-18 19:51:24 -07:00
parent 714601b29d
commit a139474486

2
ed.c
View File

@ -633,7 +633,7 @@ dowrite(const char *fname, int trunc)
for (i = line1; i <= line2; ++i) {
gettxt(i);
bytecount += text.siz - 1;
fputs(text.str, fp);
fwrite(text.str, 1, text.siz - 1, fp);
}
curln = line2;