🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #1164

Re: gcc (djgpp) default file mode (text vs binary) question?

#1164
From: DJ Delorie
Date: Mon, 31 Aug 1992 23:43
21 lines
1330 bytes
In article <BtJuws.ACx@acsu.buffalo.edu>, bandu@acsu.buffalo.edu (Jagath Samarabandu) writes:
> I'm trying to port a bunch of unix image processing programs using djgpp and
> have trouble setting the default file mode to binary. 
> 
> The file 'libc.doc' that comes with the distribution says I can set the global
> variable _ftype to O_TEXT or O_BINARY and it should set the default file type.
> But this doesn't seem to work. 

At least in the latest version (1.08), you can call setmode() on a
file.  This is required for stdin/stdout/stderr, which are already
opened by the time you call main().  Also, it's always safe to use
"rb" or "wb" when you can.

> PS: Hats off to those who toiled to port gcc (djgpp). It even beats the pants
> off of Borland C++ 3.1 for my application (both code size and speed).

Thanks!

DJ
dj@ctron.com
Life is a banana.
Technical Details
Message-ID: <4915@balrog.ctron.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!purdue!mentor.cc.purdue.edu!noose.ecn.purdue.edu!samsung!balrog!ctron.com
References: <BtJuws.ACx@acsu.buffalo.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!purdue!mentor.cc.purdue.edu!noose.ecn.purdue.edu!samsung!balrog!ctron.com
From: dj@ctron.com (DJ Delorie)
Newsgroups: comp.os.msdos.programmer
Subject: Re: gcc (djgpp) default file mode (text vs binary) question?
Message-ID: <4915@balrog.ctron.com>
Date: 31 Aug 92 23:43:15 GMT
References: <BtJuws.ACx@acsu.buffalo.edu>
Sender: usenet@balrog.ctron.com
Reply-To: dj@ctron.com
Organization: None whatsoever
Lines: 21