![]() |
![]()
| ![]() |
![]()
NAMExt_ff_seeko() - Reposition file descriptor under a fast file stream LIBRARY#include <xtend/fast-file.h> -lxtend SYNOPSISint xt_ff_seeko(xt_ff_t *stream, off_t offset, int whence) ARGUMENTSstream Pointer to a xt_ff_t structure offset New position in bytes forward or backward from whence (positive or negative) whence SEEK_SET (beginning of file), SEEK_CUR (current position), or SEEK_END (end of file) DESCRIPTIONxt_ff_seeko(3) repositions the file descriptor underlying stream to any position within the file, using lseek(2). It is analogous to fseeko(3). The stream must refer to a regular file, as pipes are not generally seekable. RETURN VALUES0 on success, -1 on failure (errno set) EXAMPLES// Reposition so that 10th byte in the file is the next one read xt_ff_seeko(stream, 10, SEEK_SET); SEE ALSOfseek(3), lseek(2)
|