1fgetpos(3C)              Standard C Library Functions              fgetpos(3C)
2
3
4

NAME

6       fgetpos - get current file position information
7

SYNOPSIS

9       #include <stdio.h>
10
11       int fgetpos(FILE *stream, fpos_t *pos);
12
13

DESCRIPTION

15       The  fgetpos()  function  stores the current value of the file position
16       indicator for the stream pointed to by stream in the object pointed  to
17       by  pos.  The  value  stored contains unspecified information usable by
18       fsetpos(3C) for repositioning the stream to its position at the time of
19       the call to fgetpos().
20

RETURN VALUES

22       Upon  successful completion, fgetpos() returns 0. Otherwise, it returns
23       a non-zero value and sets errno to indicate the error.
24

ERRORS

26       The fgetpos() function may fail if:
27
28       EBADF        The file descriptor underlying stream is not valid.
29
30
31       ESPIPE       The file descriptor underlying stream is associated with a
32                    pipe, a FIFO, or a socket.
33
34
35       EOVERFLOW    The  current  value  of the file position cannot be repre‐
36                    sented correctly in an object of type fpos_t.
37
38

USAGE

40       The fgetpos() function has a transitional  interface  for  64-bit  file
41       offsets.  See lf64(5).
42

ATTRIBUTES

44       See attributes(5) for descriptions of the following attributes:
45
46
47
48
49       ┌─────────────────────────────┬─────────────────────────────┐
50ATTRIBUTE TYPE               ATTRIBUTE VALUE              
51       ├─────────────────────────────┼─────────────────────────────┤
52       │Interface Stability          │Standard                     │
53       └─────────────────────────────┴─────────────────────────────┘
54

SEE ALSO

56       fopen(3C),     fsetpos(3C),    ftell(3C),    rewind(3C),    ungetc(3C),
57       attributes(5), lf64(5), standards(5)
58
59
60
61SunOS 5.11                        24 Jul 2002                      fgetpos(3C)
Impressum