summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
2a9e20e)
oops: hPutStr wasn't flushing a line-buffered handle properly at the
end of a line.
MERGE TO STABLE
#undef DEBUG_DUMP
-- -----------------------------------------------------------------------------
#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
--
--
-- (c) The University of Glasgow, 1992-2001
--
import PrelBase
import PrelPosix
import PrelBase
import PrelPosix
import PrelMarshalUtils
import PrelStorable
import PrelCError
import PrelMarshalUtils
import PrelStorable
import PrelCError
return ()
shoveString n (c:cs) = do
n' <- writeCharIntoBuffer raw n c
return ()
shoveString n (c:cs) = do
n' <- writeCharIntoBuffer raw n c
+ 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