Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!leah!rpi!crdgw1!steinmetz!sungod!davidsen From: davidsen@sungod.steinmetz (William Davidsen) Newsgroups: comp.unix.xenix Subject: Re: NEED HELP: fread, fwrite, fseek, ftell Keywords: AAAAAAAAARRRRRGGGHHH Message-ID: <13739@steinmetz.ge.com> Date: 3 May 89 20:43:55 GMT References: <7327@mrspoc.UUCP> <2445@solo3.cs.vu.nl> Sender: news@steinmetz.ge.com Reply-To: davidsen@sungod.UUCP (William Davidsen) Organization: General Electric CRD, Schenectady, NY Lines: 15 In article <2445@solo3.cs.vu.nl> maart@cs.vu.nl (Maarten Litmaath) writes: |Solution: insert | | fseek(swabfile, ftell(swabfile), 0); | |At first sight this looks like a no-op, but there are some `interesting' |side-effects... I wasn't going to say anything, but this is a real kludge solution (it works, however). If you do fseek(swabfile, 0L, 1); It avoids the call to ftell. There's no reason to "tell me where I am and then seek back there," when "move me zero bytes from where I am" will suffice.