Path: utzoo!censor!geac!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!cs.utexas.edu!uunet!spool2.mu.edu!uwm.edu!ux1.cso.uiuc.edu!csrd.uiuc.edu!s4.csrd.uiuc.edu!bruner From: bruner@sp15.csrd.uiuc.edu (John Bruner) Newsgroups: comp.sys.mac.programmer Subject: Re: stdio, THINK C and APPLs Message-ID: Date: 8 Jan 91 18:02:22 GMT References: <640.2783DEFA@busker.fidonet.org> <1991Jan7.224021.9163@svc.portal.com> <1991Jan8.160431.3537@ux1.cso.uiuc.edu> Sender: news@csrd.uiuc.edu (news) Organization: CSRD, University of Illinois Lines: 49 In-Reply-To: dorner@pequod.cso.uiuc.edu's message of Tue, 8 Jan 1991 16:04:31 GMT Perhaps this has changed in the final version, but section 4.9.5.3 of the 7 December 1988 draft of the ANSI C standard says: Synopsis #include FILE *fopen(const char *filename, const char *mode); Description The fopen function opens the file whose name is the string pointed to by filename and associates a string with it. The argument mode points to a string beginning with one of the following sequences: (footnote 112) ... Footnote 112 says "Additional characters may follow these sequences." In the Rationale (also section 4.9.5.3) it says ... An implementation may choose to allow additional file specifications as part of the mode string argument. For instance, file1 = fopen(file1name, "wb,reclen=80"); might be a reasonable way, on a system which provides record-oriented binary files, for an implementation to allow a programmer to specify record length. This brings the conclusion that an implementation that allows the resource fork to be fopen'ed by using some extra characters in the mode string would be ANSI-compliant. A program that uses such a feature will be portable only if the different C language implementations for the Mac all provide this extension in a mutually-compatible fashion. A program that manipulates the resource fork is not going to be portable to non-Mac platforms, regardless of whether or not it uses extensions to fopen(). -- John Bruner Center for Supercomputing R&D, University of Illinois bruner@csrd.uiuc.edu (217) 244-4476 -- John Bruner Center for Supercomputing R&D, University of Illinois bruner@csrd.uiuc.edu (217) 244-4476