Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fgetpos(3S) — HP-UX 7.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fseek(3S)

fopen(3S)

popen(3S)

ungetc(3S)

FGETPOS(3S)

NAME

fgetpos, fsetpos − save and restore a file position indicator for a stream

SYNOPSIS

#include <stdio.h>

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

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

DESCRIPTION

Fgetpos stores the current value of the file position indicator for the stream pointed to by 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. 

Fsetpos sets the file position indicator for the stream pointed to by stream according to the value of the object pointed to by pos, which shall be a value set by an earlier call to fgetpos on the same stream. 

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

RETURN VALUES

If successful, these functions return zero; otherwise non-zero. 

WARNINGS

Failure may occur if these functions are used on a file that has not been opened via fopen; in particular, they may not be used on a terminal, or on a file opened via popen(3S).

SEE ALSO

fseek(3S), fopen(3S), popen(3S), ungetc(3S). 

STANDARDS CONFORMANCE

fgetpos: ANSI C

Hewlett-Packard Company  —  HP-UX Release 7.0: Sept 1989

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