Xref: news2.mv.net comp.os.msdos.djgpp:1190 From: williams AT utkux4 DOT utk DOT edu (Myles Williams) Newsgroups: comp.os.msdos.djgpp Subject: Re: fgetc Date: 16 Feb 1996 07:42:53 GMT Organization: University of Tennessee, Knoxville Lines: 15 Message-ID: References: NNTP-Posting-Host: utkux4.utcc.utk.edu In-reply-to: bmm@bmm.pc.cs.cmu.edu's message of 15 Feb 1996 22:19:53 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In article bmm AT bmm DOT pc DOT cs DOT cmu DOT edu (Bruce Maggs) writes: The function getc seems to be skipping over bytes with value 13 (a.k.a. \r and carriage return). In particular, the following program, when compiled with djgpp version 1.12maint4, seems to never print out a value of 13, even when there are bytes with value 13 in the first 265 bytes of the input stream: The C standard does not specify whether stdin is a text or binary file. Apparently DJGPP assumes text. Try freopen'ing it as binary. -- Myles Williams "When you see me again, it won't be me." http://funnelweb.utcc.utk.edu/~williams/ : Free software, Emacs HTML mode, : U.S. government, Censorship