
25 Oct
2006
25 Oct
'06
1:08 p.m.
On Wed, Oct 25, 2006 at 06:57:38PM +0200, Hans van Thiel wrote:
Yes, but the problem is with two subsequent runs of main. I'd have thought the buffer would flush automatically and the second run would start with an empty buffer. Now I enter 'b', then press 'Enter' and it works as expected. Then I 'main' again, and it terminates right away with a blank line.
That is normal Unix behaviour. Try the same input with head -1c | od -c; head -1c | od -c The terminal buffer is only discarded if a program changes the terminal mode. Hugs and ghci do (because they use readline), but runhugs doesn't.