Re: [9fans] fmt(1) standard behaviour

2009-10-19 Thread roger peppe
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 : >

Re: [9fans] fmt(1) standard behaviour

2009-10-18 Thread 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

Re: [9fans] fmt(1) standard behaviour

2009-10-18 Thread erik quanstrom
> 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

[9fans] fmt(1) standard behaviour

2009-10-18 Thread Akshat Kumar
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