Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fsetpos(3C) — Sun WorkShop 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

lseek(2V)

fseek(3S)

ungetc(3S)

fsetpos(3C)  —  COMPATIBILITY FUNCTIONS

NAME

fsetpos, fgetpos − reposition a file pointer in a stream

SYNOPSIS

#include <stdio.h>

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

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

DESCRIPTION

fsetpos() sets the position of the next input or output operation on the stream according to the value of the object pointed to by pos.  The object pointed to by pos must be a value returned by an earlier call to fgetpos() on the same stream. 

fsetpos() clears the end-of-file indicator for the stream and undoes any effects of the ungetc() function on the same stream. After fsetpos(), the next operation on a file opened for update may be either input or output. 

fgetpos() stores the current value of the file position indicator for stream in the object pointed to by pos.  The value stored contains information usable by fsetpos() for repositioning the stream to its position at the time of the call to fgetpos(). 

RETURN VALUES

If successful, both fsetpos() and fgetpos() return zero.  Otherwise, they both return nonzero. 

SEE ALSO

lseek(2V), fseek(3S), ungetc(3S)

NOTES

The unbundled ANSI C compiler provides ANSI versions of most of the system header files, which are used automatically at compile time. For example, the directive
#include <stdio.h> will use the file provided by this compiler, rather than /usr/include/stdio.h. 

Sun Release 4.1  —  Last change: 21 June 1994

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026