Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!sun-barr!texsun!pollux!attctc!chasm From: chasm@attctc.Dallas.TX.US (Charles Marslett) Newsgroups: comp.os.minix Subject: Re: stdio Summary: fseeks and open-append Message-ID: <9337@attctc.Dallas.TX.US> Date: 12 Sep 89 18:20:55 GMT References: <18952@princeton.Princeton.EDU> <1521@bruce.OZ> Organization: The Unix(R) Connection, Dallas, Texas Lines: 20 In article <1521@bruce.OZ>, cechew@bruce.OZ (Earl Chew) writes: > From article <18952@princeton.Princeton.EDU>, by nfs@notecnirp.Princeton.EDU (Norbert Schlenker): > I don't know how useful this is. fgetc and fputc are function versions of putc > and getc, but other than that... > I'm not clear about this. Is it specifically stated in Posix that `a' mode will > always write at the end of the file? Does that mean that fseek() on a stream > opened in `a' mode will fail? I am about to put in code for three argument > opens which are supported by Simon Poole's patches. Are these going into 1.4b? As I understand the standard (corrections will be appreciated if anyone has a copy of a recent draft handy!), Posix requires that all writes go to the end of the file, but fseek is allowed (if the open included "r"?), and reads will be from the repositioned file pointer. I hope someone will correct this if I am wrong on any of the points (I do not have a copy of the Posix standard). > Earl Charles