Article View: comp.sys.amiga.tech
Article #10392Re: fopen() modes in Lattice C
From: William Norris
Date: Sun, 27 Nov 1988 17:39
Date: Sun, 27 Nov 1988 17:39
23 lines
1594 bytes
1594 bytes
In article <6241@killer.DALLAS.TX.US> jdp@killer.DALLAS.TX.US (Jim Pritchett) writes:
>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? I have Aztec
>C and it does not mention this at all. Neither does my K&R - unless I missed
>it somehow.
>
>If the above is less than clear, maybe an example will help.
>
> fopen(temp, "wb");
The `b' stands for binary (versus `t' text) and does no translation on
your file stream. In text mode, CR-LF sequences are translated to NL
characters on input. On output, the reverse occurs: NL's are translated
to CR-LF's.
NOTE: This information was neither in K&R nor my Manx (Compiler :-) ) C.
I looked it up in Microsoft C and I've used this mode in UNIX before.
--
wbnsnsr@nmtsun.nmt.edu | /// Seulement
William B. Norris IV |\\ /// l'Amiga peut
POB #2185 C/S | \\// vous l'offrir.
Socorro, NM 87801 |=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID:
<1530@nmtsun.nmt.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!unmvax!nmtsun!wbnsnsrReferences:
<6241@killer.DALLAS.TX.US>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!unmvax!nmtsun!wbnsnsr From: wbnsnsr@nmtsun.nmt.edu (William Norris) Newsgroups: comp.sys.amiga.tech Subject: Re: fopen() modes in Lattice C Keywords: fopen() modes Lattice C Message-ID: <1530@nmtsun.nmt.edu> Date: 27 Nov 88 17:39:40 GMT References: <6241@killer.DALLAS.TX.US> Reply-To: wbnsnsr@nmtsun.nmt.edu (William Norris) Organization: New Mexico Tech, Socorro NM Lines: 22