Path: utzoo!attcan!uunet!pdn!boake2!jc3b21!fgd3
From: fgd3@jc3b21.UUCP (Fabbian G. Dufoe)
Newsgroups: comp.sys.amiga.tech
Subject: Re: fopen() modes in Lattice C
Message-ID: <508@jc3b21.UUCP>
Date: 27 Nov 88 16:00:41 GMT
References: <6241@killer.DALLAS.TX.US>
Organization: St. Petersburg Jr. College, FL
Lines: 22

From article <6241@killer.DALLAS.TX.US>, by jdp@killer.DALLAS.TX.US (Jim Pritchett):
> Could/would someone out there please tell me what the addition of a 'b' parameter
> to the mode means in the context of a fopen() call in Lattice C?  
> [for example]     fopen(temp, "wb");

     Lattice C allows you to modify the standard fopen() modes (r, w, a)
with either an "a" or a "b".  The "a" modifier means use Mode A to do
translation on the files.  Using Mode A each carriage return character
('\r') is deleted and CTRL-Z is treated as a logical end-of-file mark on
reading.  On writing each line feed character ('\n') is expanded to a
carriage return followed by a line feed.  Mode B doesn't do any
translation.  Mode A provides some MS-DOS compatibility.  If you are
translating source from Lattice to Aztec, just drop the "b" modifiers from
the mode.

--Fabbian Dufoe
  350 Ling-A-Mor Terrace South
  St. Petersburg, Florida  33705
  813-823-2350

UUCP: ...codas!usfvax2!jc3b21!fgd3 
      ...uunet!pdn!jc3b21!fgd3