cvs commit: hugs98/libraries/Hugs IOExts.hs hugs98/src iomonad.c

panne 2004/02/20 09:45:08 PST Modified files: libraries/Hugs IOExts.hs src iomonad.c Log: Added implementations for hSetBinaryMode, hPutBuf, and hGetBuf. The non-blocking variants are left as an easy exercise for the reader... :-] Only mildly tested. ToDo: There is quite a bit of cut-n-paste code in iomonad.c, which should be cleaned up a bit. Revision Changes Path 1.18 +11 -2 hugs98/libraries/Hugs/IOExts.hs 1.72 +137 -2 hugs98/src/iomonad.c

On Fri, Feb 20, 2004 at 09:45:08AM -0800, Sven Panne wrote:
panne 2004/02/20 09:45:08 PST
Modified files: libraries/Hugs IOExts.hs src iomonad.c Log: Added implementations for hSetBinaryMode, hPutBuf, and hGetBuf. The non-blocking variants are left as an easy exercise for the reader... :-] Only mildly tested.
I don't think hSetBinaryMode can be implemented on top of stdio (which Hugs uses): openBinaryFile fopens a file with mode "rb" etc to turn off CRLF processing on systems that have that feature, and there's no way to change it later.

Ross Paterson wrote:
I don't think hSetBinaryMode can be implemented on top of stdio (which Hugs uses) [...]
And I'm not sure if hPutBufNonBlocking and hGetBufNonBlocking can be implemented on top of stdio. I've implemented the java.io package for my previous company, and we had to switch to file descriptors to get the required (non-)blocking behaviour. Perhaps we have to abandon stdio in Hugs at some point, too... Cheers, S.
participants (3)
-
Ross Paterson
-
Sven Panne
-
Sven Panne