fsetpos


fsetpos

Sets a file position indicator to a previously recorded position

 #include <stdio.h> int fsetpos ( FILE *fp , const fpos_t *ppos  ); 

The fsetpos( ) function sets the file position indicator for the file specified by the FILE pointer argument. The ppos argument, a pointer to the value of the new position, typically points to a value obtained by calling the fgetpos( ) function.

The function returns 0 if successful. If an error occurs, fsetpos( ) returns a nonzero value and sets the errno variable to an appropriate positive value.

The type fpos_t is defined in stdio.h, and may or may not be an integer type.

Example

See the example for fgetpos( ) in this chapter.

See Also

fgetpos( ), fseek( ), ftell( ), rewind( )



C(c) In a Nutshell
C in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596006977
EAN: 2147483647
Year: 2006
Pages: 473

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net