fsetpos

Syntax

int fsetpos(FILE * file, fpos_t * position)

Arguments

file
A pointer to the file that you are working with (obtained with fopen).
position
A 64-bit pointer to the new position in the file you want to move to (obtained with (fgetpos)?).

Return

Returns zero if the operation completed successfully, non-zero otherwise.

Description

Changes the current read/write position in the file to the new position, given by position. Not really intended for moving to random positions in a file, unless you've already obtained pointers to those positions previously using (fgetpos)?. For random file seeking, you should use fseek instead.
Note that position is actually a 64-bit pointer, which FilterMeister doesn't yet support. If you need to use this, you should allocate your own memory for the pointer, or use the fact that the k0 & k1 variables are allocated next to each other in memory.

Example

Also see

fread, fseek, fwrite, fclose

Comments