1FGETPOS(P)                 POSIX Programmer's Manual                FGETPOS(P)
2
3
4

NAME

6       fgetpos - get current file position information
7

SYNOPSIS

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

DESCRIPTION

15       The  fgetpos()  function  shall  store  the current values of the parse
16       state (if any) and file position indicator for the stream pointed to by
17       stream  in  the  object  pointed  to by pos.  The value stored contains
18       unspecified information  usable  by  fsetpos()  for  repositioning  the
19       stream to its position at the time of the call to fgetpos().
20

RETURN VALUE

22       Upon  successful  completion,  fgetpos()  shall return 0; otherwise, it
23       shall return a non-zero value and set errno to indicate the error.
24

ERRORS

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

EXAMPLES

44       None.
45

APPLICATION USAGE

47       None.
48

RATIONALE

50       None.
51

FUTURE DIRECTIONS

53       None.
54

SEE ALSO

56       fopen() , ftell() , rewind() , ungetc() , the Base  Definitions  volume
57       of IEEE Std 1003.1-2001, <stdio.h>
58
60       Portions  of  this text are reprinted and reproduced in electronic form
61       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
62       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
63       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
64       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
65       event of any discrepancy between this version and the original IEEE and
66       The  Open Group Standard, the original IEEE and The Open Group Standard
67       is the referee document. The original Standard can be  obtained  online
68       at http://www.opengroup.org/unix/online.html .
69
70
71
72IEEE/The Open Group                  2003                           FGETPOS(P)
Impressum