ANSI draft - seeking to eof

matt at prism.UUCP matt at prism.UUCP
Thu Nov 28 05:40:00 AEST 1985


The latest (November 11) draft from X3J11 says this about fseek():

	int fseek (FILE *stream, long offset, int ptrname)
	
	A binary stream need not meaningfully support fseek
	calls with a ptrname value of SEEK_END.

	For a text stream, either offset must be zero, or
	offset must be a value returned by an earlier call
	to ftell on the same stream and ptrname must be 
	SEEK_SET.			
				[X3J11/85-138, page 109]

Does this really mean that there's no guaranteed way to seek to the end of
either a text or a binary stream in ANSI C (when such a beast exists)?

------------------------------------------------------------------------------
 Matt Landau      	 {cca, ihnp4!inmet, mit-eddie, wjh12} !mirror!matt
 Mirror Systems, Inc.	 2076 Massachusetts Avenue
			 Cambridge, MA   02140



More information about the Comp.lang.c mailing list