delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/03/13/11:33:49

From: Michael Meissner <meissner AT cygnus DOT com>
Subject: Re: gcc for WinNT
13 Mar 1997 11:33:49 -0500 :
Distribution: cygnus
Message-ID: <sypvx3hhua.fsf@tiktok.cygnus.com>
References: <199703072049 DOT PAA27466 DOT cygnus DOT gnu-win32 AT cinna DOT ultra DOT net>
X-Newsreader: Gnus v5.3/Emacs 19.34

jdennis AT ultranet DOT com ("John R. Dennis") writes:

> There are many ways to set binary vs. text mode on a file stream.
> 
> in fopen add either the b (binary) or the t (text) character in
> the mode string, e.g. fopen(filename "rb") to open a file for binary
> reading. 

Umm, if you want your code to be portable, don't use the t in the mode string.
Ie, use "r" for read-only text files, and "rb" for read-only binary files.

-- 
Michael Meissner, Cygnus Solutions (East Coast)
4th floor, 955 Massachusetts Avenue, Cambridge, MA 02139, USA
meissner AT cygnus DOT com,	617-354-5416 (office),	617-354-7161 (fax)

- Raw text -


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