*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> fsetpos (3s)              
Title
Content
Arch
Section
 

Contents


FSETPOS(3S)							   FSETPOS(3S)


NAME    [Toc]    [Back]

     fsetpos, fsetpos64, fgetpos, fgetpos64 - reposition a file	pointer	in a
     stream

SYNOPSIS    [Toc]    [Back]

     #include <stdio.h>

     int fsetpos (FILE *stream,	const fpos_t *pos);

     int fsetpos64 (FILE *stream, const	fpos64_t *pos);

     int fgetpos (FILE *stream,	fpos_t *pos);

     int fgetpos64 (FILE *stream, fpos64_t *pos);

DESCRIPTION    [Toc]    [Back]

     Fsetpos and fgetpos save and restore the file position indicated by the
     value of the object pointed at by pos.

     The functions fsetpos64 and fgetpos64 are identical to fsetpos and
     fgetpos respectively, except that they take an fpos64_t * as an argument.
     This allows for the specification of a file position that is greater that
     2 Gigabytes.

     A call to fgetpos stores the current value	of the file position indicator
     for stream	in the object pointed at by pos.  The information is encoded
     in	a format which may only	be usable by fsetpos for the repositioning the
     stream to its position at the time	of the call to fgetpos.

     Fsetpos restores the file position	of the stream to the value encoded in
     the object	pointed	at by pos, which must have been	set by a previous call
     to	fgetpos	on the same stream.  A successful call to fsetpos clears the
     end-of-file indicator for the stream and undoes any effect	of the
     ungetc(3S)	function on it.	 After a call to fsetpos, the next operation
     on	an update stream may be	either input or	output.

SEE ALSO    [Toc]    [Back]

      
      
     lseek(2), fseek(3s), fopen(3S), popen(3S),	stdio(3S), ungetc(3S).

DIAGNOSTICS    [Toc]    [Back]

     If	successful, both fsetpos and fgetpos return zero.  On failure, they
     return non-zero and set errno to indicate the error.


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
rewind Tru64 Reposition the file pointer of a stream
ftello Tru64 Reposition the file pointer of a stream
ftell Tru64 Reposition the file pointer of a stream
fgetpos Tru64 Reposition the file pointer of a stream
fseeko Tru64 Reposition the file pointer of a stream
fsetpos Tru64 Reposition the file pointer of a stream
fseek_unlocked Tru64 Reposition the file pointer of a stream
fseek Tru64 Reposition the file pointer of a stream
fileno Tru64 Map a stream pointer to a file descriptor
SSL_SESSION_print_fp Tru64 Write data in the SSL_SESSION structure to the BIO or to an I/O stream specified by the file pointer
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service