Date: Sun, 18 Feb 1996 09:50:45 +0200 (IST) From: Eli Zaretskii To: Myles Williams Cc: djgpp AT delorie DOT com Subject: Re: fgetc In-Reply-To: Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On 16 Feb 1996, Myles Williams wrote: > The C standard does not specify whether stdin is a text or binary > file. Apparently DJGPP assumes text. Try freopen'ing it as binary. A better way is to use the `setmode' library function, because `freopen' requires that you know the name of the file to reopen. stdin could be redirected from the command line, in which case you don't know the name of the file.