Gets a stream's file pointer position-indicator and stores it. This function does not get the file pointer; use ftell instead.
#include <stdio.h>
#define _USE_32BIT_FPOS_T // (default) for 32 bit fpos_t #define _USE_64BIT_FPOS_T // for 64bit fpos_t int fgetpos (FILE *stream, fpos_t *pos);
int _fgetpos32 (FILE *stream, fpos32_t *pos); // INtime 7.3+
int _fgetpos64 (FILE *stream, fpos64_t *pos); // INtime 7.3+
stream
pos
The file pointer position-indicator value is stored in fpos_t format, which is used only by fgetpos and fsetpos. fsetpos can use information stored in pos to reset the file pointer for stream to its position at the time fgetpos was called.
| EBADF | The specified stream is not a valid file descriptor or is not accessible. |
| EINVAL | The stream value is invalid. |
| Versions | Defined in | Include | Link to |
|---|---|---|---|
| INtime 3.0 | intime/rt/include/stdio.h | stdio.h | clib.lib |