Mail Archives: djgpp/1996/09/12/02:00:11
On Wed, 11 Sep 1996, John Moon wrote:
> This may be a dumb question, but
> when I try to read a ^C char in binary from a
> file I get an EOF condition, no matter if I try
> to read further into the file or not. Is this a
Your program doesn't open the file in binary mode, so it stops reading at
the first ^Z (not ^C) character it sees. ^Z is a kind of software EOF in
DOS, and DJGPP behaves this way also to be compatible. Change your
program to say `fopen(file, "rb")' and `fopen(file, "wb")', and you
should be OK.
- Raw text -