logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

fgetpos.3p (3006B)


  1. '\" et
  2. .TH FGETPOS "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. fgetpos
  12. \(em get current file position information
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <stdio.h>
  17. .P
  18. int fgetpos(FILE *restrict \fIstream\fP, fpos_t *restrict \fIpos\fP);
  19. .fi
  20. .SH DESCRIPTION
  21. The functionality described on this reference page is aligned with the
  22. ISO\ C standard. Any conflict between the requirements described here and the
  23. ISO\ C standard is unintentional. This volume of POSIX.1\(hy2017 defers to the ISO\ C standard.
  24. .P
  25. The
  26. \fIfgetpos\fR()
  27. function shall store the current values of the parse state (if any)
  28. and file position indicator for the stream pointed to by
  29. .IR stream
  30. in the object pointed to by
  31. .IR pos .
  32. The value stored contains unspecified information usable by
  33. \fIfsetpos\fR()
  34. for repositioning the stream to its position at the time of the call to
  35. \fIfgetpos\fR().
  36. .P
  37. The
  38. \fIfgetpos\fR()
  39. function shall not change the setting of
  40. .IR errno
  41. if successful.
  42. .SH "RETURN VALUE"
  43. Upon successful completion,
  44. \fIfgetpos\fR()
  45. shall return 0; otherwise, it shall return a non-zero value and set
  46. .IR errno
  47. to indicate the error.
  48. .SH ERRORS
  49. The
  50. \fIfgetpos\fR()
  51. function shall fail if:
  52. .TP
  53. .BR EBADF
  54. The file descriptor underlying
  55. .IR stream
  56. is not valid.
  57. .TP
  58. .BR EOVERFLOW
  59. The current value of the file position cannot be represented correctly
  60. in an object of type
  61. .BR fpos_t .
  62. .TP
  63. .BR ESPIPE
  64. The file descriptor underlying
  65. .IR stream
  66. is associated with a pipe, FIFO, or socket.
  67. .LP
  68. .IR "The following sections are informative."
  69. .SH EXAMPLES
  70. None.
  71. .SH "APPLICATION USAGE"
  72. None.
  73. .SH RATIONALE
  74. None.
  75. .SH "FUTURE DIRECTIONS"
  76. None.
  77. .SH "SEE ALSO"
  78. .IR "Section 2.5" ", " "Standard I/O Streams",
  79. .IR "\fIfopen\fR\^(\|)",
  80. .IR "\fIftell\fR\^(\|)",
  81. .IR "\fIrewind\fR\^(\|)",
  82. .IR "\fIungetc\fR\^(\|)"
  83. .P
  84. The Base Definitions volume of POSIX.1\(hy2017,
  85. .IR "\fB<stdio.h>\fP"
  86. .\"
  87. .SH COPYRIGHT
  88. Portions of this text are reprinted and reproduced in electronic form
  89. from IEEE Std 1003.1-2017, Standard for Information Technology
  90. -- Portable Operating System Interface (POSIX), The Open Group Base
  91. Specifications Issue 7, 2018 Edition,
  92. Copyright (C) 2018 by the Institute of
  93. Electrical and Electronics Engineers, Inc and The Open Group.
  94. In the event of any discrepancy between this version and the original IEEE and
  95. The Open Group Standard, the original IEEE and The Open Group Standard
  96. is the referee document. The original Standard can be obtained online at
  97. http://www.opengroup.org/unix/online.html .
  98. .PP
  99. Any typographical or formatting errors that appear
  100. in this page are most likely
  101. to have been introduced during the conversion of the source files to
  102. man page format. To report such errors, see
  103. https://www.kernel.org/doc/man-pages/reporting_bugs.html .