LabWindows/CVI

Content Type
Programming Language
Current manual
Table of Contents

fsetpos

fsetpos

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

Purpose

Sets the file position indicator for the specified stream according to the value obtained from an earlier call to fgetpos. If successful, the end-of-file indicator for the stream is cleared and any effects of ungetc are undone. On streams open for update, this function allows for a switch between reading and writing.

Note Note  This function is similar to fseek but is more useful for files that contain more than 2 billion bytes.

Parameters

Input
Name Type Description
stream FILE * Contains a pointer to the stream that has its associated file position indicator set.
newFilePosition const fpos_t * Contains a value obtained from an earlier call to fgetpos. The file position indicator for the specified stream is set according to this value.

Return Value

Name Type Description
status int Contains the resulting status of the function. If successful, fsetpos returns 0. If an error occurs, fsetpos returns a nonzero value and sets errno to a nonzero value.

Additional Information

Library: ANSI C Library

Include file: ansi_c.h

LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later

Was this information helpful?

Previous

fgetpos

Next

rewind

Previous

fgetpos

Next

rewind