Date: Thu, 12 Sep 1996 08:47:10 +0200 (IST) From: Eli Zaretskii To: John Moon Cc: djgpp AT delorie DOT com, moon2 AT ccfsun DOT nrl DOT navy DOT mil Subject: Re: Binary files and ^C chars-try again In-Reply-To: <3237032D.258A@ccfsun.nrl.navy.mil> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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.