binary IO

2000-02-11 Thread Johannes Waldmann
i'd like to read a byte stream from stdin. the stream contains 0xFF now and then. i fear that such a byte is treated as EOF by ghc, because processing seems to stop right after it first occured. do you know a workaround? in case you're asking - i'm trying to implement the GMP (go modem

Re: binary IO

2000-02-11 Thread Sven Panne
Johannes Waldmann wrote: i'd like to read a byte stream from stdin. the stream contains 0xFF now and then. i fear that such a byte is treated as EOF by ghc, because processing seems to stop right after it first occured. Hmmm, I've never experienced something like this. The following code

RE: binary IO

2000-02-11 Thread Sigbjorn Finne
Hi, if you're using ghc under Win32, this is expected behaviour (and is there because of backwards compatibility with CP/M - see http://support.microsoft.com/support/kb/articles/Q68/4/23.asp for more info.) The fix is to open your file in BinaryMode using IOExts.openFileEx :: FilePath -