Path: utzoo!mnetor!uunet!oddjob!ncar!ames!umd5!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: a couple of random questions Message-ID: <7745@brl-smoke.ARPA> Date: 24 Apr 88 16:07:53 GMT References: <530@vsi.UUCP> <10426@steinmetz.ge.com> <541@vsi.UUCP> <7706@brl-smoke.ARPA> <2636@bsu-cs.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Distribution: comp Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 15 In article <2636@bsu-cs.UUCP> dhesi@bsu-cs.UUCP (Rahul Dhesi) writes: >(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. Although I believe this to be correct, I don't see what relevance it has for the preceding discussion. Certainly we never promised that the cookies returned by ftell() were uniquely determined by the byte-stream model position. In fact, in a record-oriented architecture, it is easy to imagine that an ftell() cookie might represent the same position as either the record number plus an offset into it, or as the next record number minus an offset back into the preceding record, depending on how one has been manipulating the stream.