oops: hPutStr wasn't flushing a line-buffered handle properly at the
end of a line.
MERGE TO STABLE
#undef DEBUG_DUMP
-- -----------------------------------------------------------------------------
--- $Id: PrelIO.hsc,v 1.11 2001/08/23 10:36:50 sewardj Exp $
+-- $Id: PrelIO.hsc,v 1.12 2001/09/14 14:51:06 simonmar Exp $
--
-- (c) The University of Glasgow, 1992-2001
--
import PrelBase
import PrelPosix
-import PrelMarshalAlloc
import PrelMarshalUtils
import PrelStorable
import PrelCError
return ()
shoveString n (c:cs) = do
n' <- writeCharIntoBuffer raw n c
- shoveString n' cs
+ if (c == '\n')
+ then do
+ new_buf <- commitBuffer hdl raw len n' True{-needs flush-} False
+ writeBlocks hdl new_buf cs
+ else
+ shoveString n' cs
in
shoveString 0 s