Date: Sun, 16 Jan 2000 10:29:56 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Aaron Chernosky cc: djgpp AT delorie DOT com Subject: Re: Binary Files In-Reply-To: <38808ACC.6C76D41C@wt.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: dj-admin AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Sat, 15 Jan 2000, Aaron Chernosky wrote: > Does the function getc(FILE *f) work with binary files, mainly in that > it doesn't screw up the data when u read it in? It does, if you open the stream f in binary mode (or switch it to binary mode using `setmode'). If the stream f is connected to the console, and you want single-character input, you need to use termios functions (tcsetattr etc.) to set the terminal for such read mode. See the docs of tcsetattr and the section called "Termios function" in libc.info for more details.