delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/11/08/15:34:57

From: Robert Neinast <neinast AT worldnet DOT att DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Can't Even Read File Correctly
Message-ID: <MPG.1654b32b33937e91989692@netnews.worldnet.att.net>
References: <MPG DOT 165491792e225e13989690 AT netnews DOT worldnet DOT att DOT net> <9sei6v$8j9$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <MPG DOT 1654a7511c522106989691 AT netnews DOT worldnet DOT att DOT net>
X-Newsreader: MicroPlanet Gravity v2.50
Lines: 25
Date: Thu, 08 Nov 2001 20:19:04 GMT
NNTP-Posting-Host: 12.87.146.53
X-Complaints-To: abuse AT worldnet DOT att DOT net
X-Trace: bgtnsc06-news.ops.worldnet.att.net 1005250744 12.87.146.53 (Thu, 08 Nov 2001 20:19:04 GMT)
NNTP-Posting-Date: Thu, 08 Nov 2001 20:19:04 GMT
Organization: AT&T Worldnet
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

In article <MPG DOT 1654a7511c522106989691 AT netnews DOT worldnet DOT att DOT net>, 
neinast AT worldnet DOT att DOT net says...
> In article <9sei6v$8j9$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE>, broeker AT physik DOT rwth-
> aachen.de says...
> > Robert Neinast <neinast AT worldnet DOT att DOT net> wrote:
> > 
> > > This is driving me nuts.  In C, I'm doing simple getchars from
> > > stdin and writing to a file, and it keeps getting truncated.
> > > Anybody have any ideas what the heck I'm doing wrong????
> > 
> > In DOS, text files have a different line end ("\r\n" instead of a
> > simple "\n", in C terms), and Ctrl-Z is interpreted as an end-of-file
> > marker.  Stdin is opened in *text* mode, by default.

One more question: Is there any way to start up bash so that
the default is "binary", not "text" mode (yes, I tried looking
in the documentation).  It really annoys me that programs like
ls, wc, and od count those \r\n when its only \n that's there
(i.e., they give false counts).

Bob
-- 
. . . and shun the Frumious Bandersnatch
Robert A. Neinast
Pickerington, OH

- Raw text -


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