home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.atari.st.tech
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!usc!cs.utexas.edu!convex!rosenkra
- From: rosenkra@convex.com (William Rosenkranz)
- Subject: Re: Porting UNIX Code to the ST
- Message-ID: <1993Jan08.060247.12064@convex.com>
- Sender: usenet@convex.com (news access account)
- Nntp-Posting-Host: convex1.convex.com
- Organization: CONVEX Computer Corporation, Richardson, Tx., USA
- References: <1993Jan5.214420.8268@sae.com> <1993Jan7.124324.27805@its.bt.co.uk> <ENTROPY.93Jan7224017@kropotkin.gnu.ai.mit.edu>
- Date: Fri, 08 Jan 1993 06:02:47 GMT
- X-Disclaimer: This message was written by a user at CONVEX Computer
- Corp. The opinions expressed are those of the user and
- not necessarily those of CONVEX.
- Lines: 23
-
- In article <ENTROPY.93Jan7224017@kropotkin.gnu.ai.mit.edu> entropy@gnu.ai.mit.edu (maximum entropy) writes:
- >Alternatively, the call:
- >
- > _binmode(1);
- >
- >somewhere at the beginning of a program will cause all fopen()s to
- >default to binary mode (you can then force text mode with the "t"
- >modifier in the mode specifier.) It's much easier, (and cleaner,
- >IMHO) to make this one small hack than to hunt down all the file mode
- >arguments all over a large program.
-
- unfortunately, this does not effect stdin/stdout/stderr (which are set
- in the startup code). to make them binary, you have to set a global
- (which at the moment escapes me, something like int default_mode). i
- find setting the global even easier than using binmode(). for example
- i have made a binary cat, od, etc.
-
- -bill
- rosenkra@convex.com
-
- --
- Bill Rosenkranz |UUCP: {uunet,texsun}!convex!rosenkra
- Convex Computer Corp. |ARPA: rosenkra@convex.com
-