summaryrefslogtreecommitdiff
path: root/ghc/lib/std/IO.lhs
diff options
context:
space:
mode:
authorsof <unknown>1998-11-11 17:40:16 +0000
committersof <unknown>1998-11-11 17:40:16 +0000
commitc48ad065803b3766767713cb3866893713dade2b (patch)
tree18b22a3df006c5ad096c7c6c1d27867706277795 /ghc/lib/std/IO.lhs
parentf2507326b8d64df381f4eb5a43dae10aac05cd1f (diff)
downloadhaskell-c48ad065803b3766767713cb3866893713dade2b.tar.gz
[project @ 1998-11-11 17:40:07 by sof]
Fixed endian bug that struck when outputting on non-buffered handles
Diffstat (limited to 'ghc/lib/std/IO.lhs')
-rw-r--r--ghc/lib/std/IO.lhs4
1 files changed, 2 insertions, 2 deletions
diff --git a/ghc/lib/std/IO.lhs b/ghc/lib/std/IO.lhs
index 0baa75a662..5c8c9fb0b1 100644
--- a/ghc/lib/std/IO.lhs
+++ b/ghc/lib/std/IO.lhs
@@ -329,7 +329,7 @@ hPutChar :: Handle -> Char -> IO ()
hPutChar handle c = do
handle_ <- wantWriteableHandle "hPutChar" handle
let fo = haFO__ handle_
- rc <- mayBlock fo (_ccall_ filePutc fo (ord c)) -- ConcHask: UNSAFE, may block.
+ rc <- mayBlock fo (_ccall_ filePutc fo c) -- ConcHask: UNSAFE, may block.
writeHandle handle handle_
if rc == 0
then return ()
@@ -472,7 +472,7 @@ writeChars :: Addr -> String -> IO ()
#endif
writeChars fo "" = return ()
writeChars fo (c:cs) = do
- rc <- mayBlock fo (_ccall_ filePutc fo (ord c)) -- ConcHask: UNSAFE, may block.
+ rc <- mayBlock fo (_ccall_ filePutc fo c) -- ConcHask: UNSAFE, may block.
if rc == 0
then writeChars fo cs
else constructErrorAndFail "writeChars"