SYNOPSIS
#include <stdio.h>
int fseek(FILE *stream, long offset, int whence);
int fseeko(FILE *stream, off_t offset, int whence);
int fseeko64(FILE *stream, off64_t offset, int whence);
DESCRIPTION
The
The
The
If the stream is writable, and buffered data has not yet been written
to the underlying file,
PARAMETERS
- stream
-
Points to the stream whose file pointer is to repositioned
- offset
-
Is the new position in the file (relative to whence) for the file pointer.
- whence
-
Specifies from what point the offset is determined.
RETURN VALUES
The
- EAGAIN
-
The O_NONBLOCK flag is set for the file descriptor underlying stream, and the process would be delayed in the write operation.
- EBADF
-
The file descriptor underlying stream is not valid.
- EFBIG
-
The file is a regular file and an attempt was made to write at or beyond the offset maximum associated with the corresponding stream.
- EINTR
-
A signal interrupted the call.
- EINVAL
-
The whence argument is invalid.
- ENOSPC
-
There was no free space remaining on the device containing the file.
- EOVERFLOW
-
The resulting file offset would be a value which cannot be represented correctly in an object of the requested type.
- EPIPE
-
An attempt is made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal is also sent to the process.
CONFORMANCE
ANSI/ISO 9899-1990.
MULTITHREAD SAFETY LEVEL
MT-Safe.
PORTING ISSUES
The file positions reported by
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Miscellaneous:
- lf64
PTC MKS Toolkit 10.4 Documentation Build 39.