magic cookies given back by ftell, and used in fseek

David Goodenough dg at lakart.UUCP
Sat May 21 06:33:29 AEST 1988


There has been much discussion in this group on the fact that on certain
systems (VMS I believe), ftell & fseek use magic cookies to tell about
file position. I have my asbestos suit ready if this suggestion is out of
line, but 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? I ask this based on the statement that the
cookie returned at end of file when gotten there in two different ways
was different. Am I correct in perceiving that this arises in a similar
manner to the fact that on some segmented architectures (e.g. 8088) there
are many different ways of pointing to the same address, or is it some
other reason. Since my knowledge of VMS is about nil, this is just a guess,
doubtless there will be many out there who can tell me the correct way
of doing things.
-- 
	dg at lakart.UUCP - David Goodenough		+---+
							| +-+-+
	....... !harvard!adelie!cfisun!lakart!dg	+-+-+ |
						  	  +---+



More information about the Comp.lang.c mailing list