(C) 1998 AROS - The Amiga Research OS


NAME
#include <stdio.h>

int fseek ()

SYNOPSIS
FILE * stream
long offset
int whence

FUNCTION
Change the current position in a stream.

INPUTS
stream
Modify this stream
offset, whence
How to modify the current position. whence can be SEEK_SET, then offset is the absolute position in the file (0 is the first byte), SEEK_CUR then the position will change by offset (ie. -5 means to move 5 bytes to the beginning of the file) or SEEK_END. SEEK_END means that the offset is relative to the end of the file (-1 is the last byte and 0 is the EOF).

RESULT
0 on success and -1 on error. If an error occurred, the global variable errno is set.

EXAMPLE

SEE ALSO
fopen(), fwrite()

NOTES

BUGS

INTERNALS

HISTORY
26.05.1999 hkiel
Finally fixed fseek() bug, ie. added missing Flush() before Seek()
01.03.1999 turrican
Bugfix: fseek() is supposed to return 0 in case of success, not the return value from Seek()
20.10.1998 hkiel
Amiga Research OS
06.03.1997 digulla
Two new functions