Date: Wed, 9 Apr 1997 13:34:06 +0300 (IDT) From: Eli Zaretskii To: "John M. Aldrich" cc: djgpp AT delorie DOT com Subject: Re: read reads too less under DOS but enough under linux In-Reply-To: <334A8639.6204@cs.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 8 Apr 1997, John M. Aldrich wrote: > DOS text files use a CR/LF combination to designate the end of a line, > while Unix text files use only a CR. Thus, DOS text files are larger > than the corresponding Unix file. For this reason, you should NEVER > open a text file in binary mode. That would be swell, but the problem is that you don't always know whether the file is a text or a binary one. For that reason, sometimes you have no alternative but to open it in binary mode and add special tests for the CR-LF pairs. For examples, see the DJGPP ports of Grep and Textutils.