Path: utzoo!mnetor!uunet!oddjob!ncar!boulder!sunybcs!rutgers!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.UUCP (Rahul Dhesi) Newsgroups: comp.lang.c Subject: Re: a couple of random questions Message-ID: <2636@bsu-cs.UUCP> Date: 17 Apr 88 20:43:28 GMT References: <530@vsi.UUCP> <10426@steinmetz.ge.com> <541@vsi.UUCP> <7706@brl-smoke.ARPA> Reply-To: dhesi@bsu-cs.UUCP (Rahul Dhesi) Distribution: comp Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 19 Summary: the magic cookie explodes In article <7706@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: >fseek() to an absolute position only works PORTABLY if the cookie you >give it is one obtained from ftell(). VAX/VMS C, as always, is an exception. Open a standard VMS text file for read, then: (a) keep reading until you hit end-of-file (b) do an ftell (c) do an fseek to end-of-file (with whence=2, offset=0L) (d) do an ftell again The two ftells will give different answers. (I last tried this some months ago. VMS C evolves nearly as fast as fruit files do so things might have changed since then.) -- Rahul Dhesi UUCP: !{iuvax,pur-ee,uunet}!bsu-cs!dhesi