[m-dev.] Binary Input Stream Bug Under Windows?

Ralph Becket rbeck at microsoft.com
Wed Sep 22 21:58:35 AEST 1999


It transpires that EOF under Windows is taken as the byte ^Z, a la the C
NUL string terminator, except for files opened for binary input.  However,
if I do

$ cat a_binary_file_containing_^Zs | mercury_prog

where mercury_prog is using io__read_byte/3, mercury_prog will incorrectly
register EOF the first time it hits a ^Z in the input stream.  Or is this
an oddity of piped input under NT?  If not, I suspect that the standard
binary input stream is really just stdin with no changes.  A bug, n'est pas?

Ralph
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list