Mail Archives: djgpp/1995/11/02/10:34:18

From: "A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk>
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Date: Thu, 2 Nov 1995 15:19:31 GMT
Subject: Re: CR/LF pairs... NO NO NO!

  jkmarsha AT socs DOT uts DOT edu DOT au (Justen Keven Marshall) wrote (Subject: CR/LF
pairs... NO NO NO!):-
> I am at my wits' end trying to print a line-feed without a carriage return.
> (Or the other way around.) ... in Turbo Pascal (the only other language I
> have) it didn't do it ...

In djgpp: if you open a file in text mode (e.g. fopen("miaow","w"), printing a
LF will cause DOS to automatically insert a CR also. If you open a file in
binary mode (e.g. fopen("miaow","wb"), that won't happen.

- Raw text -

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