Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
xt_ff_seeko(3)		    Library Functions Manual		  xt_ff_seeko(3)

NAME
     xt_ff_seeko() - Reposition file descriptor under a fast file stream

LIBRARY
     #include <xtend/fast-file.h>
     -lxtend

SYNOPSIS
     int     xt_ff_seeko(xt_ff_t *stream, off_t offset, int whence)

ARGUMENTS
     stream  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)

DESCRIPTION
     xt_ff_seeko(3) repositions the file descriptor underlying stream to any po-
     sition 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 VALUES
     0 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 ALSO
     fseek(3), lseek(2)

								  xt_ff_seeko(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=xt_ff_seeko&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help