#undef DEBUG_DUMP
-- -----------------------------------------------------------------------------
--- $Id: PrelIO.hs,v 1.5 2001/12/03 20:59:08 sof Exp $
+-- $Id: PrelIO.hs,v 1.6 2001/12/27 09:28:11 sof Exp $
--
-- (c) The University of Glasgow, 1992-2001
--
-- make use of the minimal buffer we already have
let raw = bufBuf buf
r <- throwErrnoIfMinus1RetryMayBlock "hGetChar"
- (read_off (fromIntegral fd) (haIsStream handle_) raw 0 1)
+ (read_off_ba (fromIntegral fd) (haIsStream handle_) raw 0 1)
(threadWaitRead fd)
if r == 0
then ioe_EOF
-- make use of the minimal buffer we already have
let raw = bufBuf buf
r <- throwErrnoIfMinus1RetryMayBlock "lazyRead"
- (read_off (fromIntegral fd) (haIsStream handle_) raw 0 1)
+ (read_off_ba (fromIntegral fd) (haIsStream handle_) raw 0 1)
(threadWaitRead fd)
if r == 0
then do handle_ <- hClose_help handle_
NoBuffering ->
withObject (castCharToCChar c) $ \buf ->
throwErrnoIfMinus1RetryMayBlock_ "hPutChar"
- (c_write (fromIntegral fd) buf 1)
+ (write_off (fromIntegral fd) (haIsStream handle_) buf 0 1)
(threadWaitWrite fd)