the reason is that the algorithm is
simpler if fmt reads all the words and then
formats them.
if you could modify the source in a simple way to make it
incremental (for instance by flushing the words at
the end of each paragraph) i imagine the patch
might be accepted.
2009/10/18 Rudolf Sykora :
>
I may not fully understand the problem, but wouldn't it be just fine
if fmt output anything it can already output?
I.e., filled lines are output, on encountering '\n' the (generally
unfilled) line is output...
(Or what is the reason that fmt waits for EOF?)
R
> it never actually formats any lines. If, on the other hand, while
> formatting on stdin, fmt(1) formatted on a line-by-line basis (per
> '\n'), then its use (at least for me) could be greatly widened.
i don't think this will help. unless you multithread fmt (seems silly),
you're going to have t
As it stands, if not specified a file, fmt(1) takes input from stdin.
In doing so, it waits for EOF before outputting the formatted
lines. I haven't looked into the code, but I suppose it was left
this way due to simplicity (from basic file handling). However,
I doubt fmt(1) is used interactively e