www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/02/18/02:57:32

Date: Sun, 18 Feb 1996 09:50:45 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Myles Williams <williams AT utkux4 DOT utk DOT edu>
Cc: djgpp AT delorie DOT com
Subject: Re: fgetc
In-Reply-To: <WILLIAMS.96Feb16024253@utkux4.utk.edu>
Message-Id: <Pine.SUN.3.91.960218094826.28845L@is>
Mime-Version: 1.0

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019