Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)

Guardian Native C Library Calls (f) fsetpos64(3)
NAME
fsetpos64 - Repositions the le pointer of a stream
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
H-series OSS processes: /G/system/zdllnnn/zcrtldll
SYNOPSIS
#include <stdio.h>
int fsetpos64(
FILE *stream,
const fpos64_t *position);
PARAMETERS
stream Species the I/O stream.
position Species the value of the le position indicator.
DESCRIPTION
The fsetpos64() function is similar to the fsetpos( ) function except that, in addition to support-
ing smaller les, the fsetpos64() function supports OSS les larger than approximately 2 giga-
bytes and Guardian les larger than approximately 4 gigabytes.
The fsetpos64() function is similar to the ftello64() function. Thefsetpos64() function sets the
le position indicator according to the value of the position parameter, returned by a prior call to
the fgetpos64() function.
A successful call to the fsetpos64() function clears the End-of-File indicator and undoes any
effects of the ungetc() function.
RETURN VALUES
Upon successful completion, the fsetpos64() function returns a value of 0 (zero). If the fset-
pos64() function fails, a value of -1 is returned, and errno is set to [EINVAL].
ERRORS
If these conditions occurs, the fsetpos64() function sets errno to the corresponding value:
[EBADF] The le descriptor underlying the stream parameter is not a valid le descriptor.
[EFBIG] The buffers of the stream need to be ushed, and the starting point is greater than
or equal to the le offset maximum established when the le was opened.
[EOVERFLOW]
The value of the le position is greater than or equal to the le offset maximum.
[ESPIPE] An illegal attempt was made to get or set the le position of a pipe or FIFO.
RELATED INFORMATION
Functions: fgetpos(3), fopen(3), fopen64(3), fseek(3), ftell(3), rewind(3).
STANDARDS CONFORMANCE
This function is an HP extension to the XPG4 Version 2 specication.
527192-007 Hewlett-Packard Company 2105