magic cookies given back by ftell, and used in fseek

Henry Spencer henry at utzoo.uucp
Sat May 28 03:14:11 AEST 1988


> ... 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



More information about the Comp.lang.c mailing list