sbase

suckless unix tools
git clone git://git.suckless.org/sbase
Log | Files | Refs | README | LICENSE

commit a1394744868e05fed3df942feaa8f79b80918f19
parent 714601b29d6ed52aaf111cde34c524bec997a555
Author: Michael Forney <mforney@mforney.org>
Date:   Fri, 18 Sep 2020 19:51:24 -0700

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.

Diffstat:
Med.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ed.c b/ed.c @@ -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;