3 <<fgetpos64>>---record position in a large stream or file
12 int fgetpos64(FILE *<[fp]>, _fpos64_t *<[pos]>);
13 int _fgetpos64_r(struct _reent *<[ptr]>, FILE *<[fp]>,
17 Objects of type <<FILE>> can have a ``position'' that records how much
18 of the file your program has already read. Many of the <<stdio>> functions
19 depend on this position, and many change it as a side effect.
21 You can use <<fgetpos64>> to report on the current position for a file
22 identified by <[fp]> that was opened by <<fopen64>>; <<fgetpos>> will write
23 a value representing that position at <<*<[pos]>>>. Later, you can
24 use this value with <<fsetpos64>> to return the file to this
27 In the current implementation, <<fgetpos64>> simply uses a character
28 count to represent the file position; this is the same number that
29 would be returned by <<ftello64>>.
32 <<fgetpos64>> returns <<0>> when successful. If <<fgetpos64>> fails, the
33 result is <<1>>. Failure occurs on streams that do not support
34 positioning or streams not opened via <<fopen64>>; the global <<errno>>
35 indicates these conditions with the value <<ESPIPE>>.
38 <<fgetpos64>> is a glibc extension.
40 No supporting OS subroutines are required.
45 #ifdef __LARGE64_FILES
48 _fgetpos64_r (struct _reent
* ptr
,
52 *pos
= (_fpos64_t
)_ftello64_r (ptr
, fp
);
67 return _fgetpos64_r (_REENT
, fp
, pos
);
70 #endif /* !_REENT_ONLY */
72 #endif /* __LARGE64_FILES */