Mail Archives: djgpp/2001/11/08/15:34:57
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 -