home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pipex!bnr.co.uk!uknet!fulcrum!its!silver.its.bt.co.uk!jvt
- From: jvt@its.bt.co.uk (John Trickey)
- Newsgroups: comp.sys.atari.st.tech
- Subject: Re: Porting UNIX Code to the ST
- Message-ID: <1993Jan11.165412.844@its.bt.co.uk>
- Date: 11 Jan 93 16:54:12 GMT
- References: <1993Jan5.214420.8268@sae.com> <1993Jan7.124324.27805@its.bt.co.uk> <ENTROPY.93Jan7224017@kropotkin.gnu.ai.mit.edu>
- Sender: @its.bt.co.uk
- Organization: BT Group Computing Services, Birmingham, UK
- Lines: 28
-
- 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.
-
- Surely thats a bad as the first sin of using Unix specific modes in the
- original fopen(). All you have done is introduced another restriction to
- portability just because you cant't be bothered to look for all the fopen()
- calls :-) :-) You may find you have to hunt them out anyway as to assume
- all fopen()'s are binary is just ONE HELL OF AN ASSUMPTION.
-
- A friendly Unix host or MinT would help:-
-
- grep fopen *.[ch] | lpr
-
- John
- --
- John Trickey <jvt@its.bt.co.uk>
- Voice: +44 21 524 8200 Fax: +44 21 553 6120
- (Home) <john@its.bt.co.uk> || <john@g4rev.ampr.org> || G4REV @ GB7FLG
- +44 21 308 8892
-