Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: magic cookies given back by ftell, and used in fseek
Message-ID: <1988May27.171411.14867@utzoo.uucp>
Organization: U of Toronto Zoology
References: <129@lakart.UUCP>
Date: Fri, 27 May 88 17:14:11 GMT

> ... have the ANSI comittee considered providing some means to convert
> from cookie format to and from character position in file. Come to that
> is such a thing possible? ...

Depending on the operating system, it can be arbitrarily difficult.  Worse,
on the more troublesome operating systems, "character position" is not very
useful and may not even be meaningful.  Some kinds of files under some
operating systems have semantics sufficiently different from Unix's simple
"sequence of bytes" concept that there simply is *NO* meaningful mapping
between the two.  You just cannot pretend that those files are sequences of
bytes; it will not work, or at least will not work in any useful way.
-- 
"For perfect safety... sit on a fence|  Henry Spencer @ U of Toronto Zoology
and watch the birds." --Wilbur Wright| {ihnp4,decvax,uunet!mnetor}!utzoo!henry
