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

fgetws.3p (3509B)


  1. '\" et
  2. .TH FGETWS "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. fgetws
  12. \(em get a wide-character string from a stream
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <stdio.h>
  17. #include <wchar.h>
  18. .P
  19. wchar_t *fgetws(wchar_t *restrict \fIws\fP, int \fIn\fP,
  20. FILE *restrict \fIstream\fP);
  21. .fi
  22. .SH DESCRIPTION
  23. The functionality described on this reference page is aligned with the
  24. ISO\ C standard. Any conflict between the requirements described here and the
  25. ISO\ C standard is unintentional. This volume of POSIX.1\(hy2017 defers to the ISO\ C standard.
  26. .P
  27. The
  28. \fIfgetws\fR()
  29. function shall read characters from the
  30. .IR stream ,
  31. convert these to the corresponding wide-character codes, place them
  32. in the
  33. .BR wchar_t
  34. array pointed to by
  35. .IR ws ,
  36. until
  37. .IR n \-1
  38. characters are read, or a
  39. <newline>
  40. is read, converted, and transferred to
  41. .IR ws ,
  42. or an end-of-file condition is encountered. The wide-character string,
  43. .IR ws ,
  44. shall then be terminated with a null wide-character code.
  45. .P
  46. If an error occurs, the resulting value of the file position indicator
  47. for the stream is unspecified.
  48. .P
  49. The
  50. \fIfgetws\fR()
  51. function may mark the last data access timestamp of the file
  52. associated with
  53. .IR stream
  54. for update. The last data access timestamp shall be marked for update
  55. by the first successful execution of
  56. \fIfgetwc\fR(),
  57. \fIfgetws\fR(),
  58. \fIfwscanf\fR(),
  59. \fIgetwc\fR(),
  60. \fIgetwchar\fR(),
  61. \fIvfwscanf\fR(),
  62. \fIvwscanf\fR(),
  63. or
  64. \fIwscanf\fR()
  65. using
  66. .IR stream
  67. that returns data not supplied by a prior call to
  68. \fIungetwc\fR().
  69. .SH "RETURN VALUE"
  70. Upon successful completion,
  71. \fIfgetws\fR()
  72. shall return
  73. .IR ws .
  74. If the end-of-file indicator for the stream is set, or if the stream
  75. is at end-of-file, the end-of-file indicator for the
  76. stream shall be set and
  77. \fIfgetws\fR()
  78. shall return a null pointer. If a read error occurs, the error
  79. indicator for the stream shall be set,
  80. \fIfgetws\fR()
  81. shall return a null pointer,
  82. and shall set
  83. .IR errno
  84. to indicate the error.
  85. .SH ERRORS
  86. Refer to
  87. .IR "\fIfgetwc\fR\^(\|)".
  88. .LP
  89. .IR "The following sections are informative."
  90. .SH EXAMPLES
  91. None.
  92. .SH "APPLICATION USAGE"
  93. None.
  94. .SH RATIONALE
  95. None.
  96. .SH "FUTURE DIRECTIONS"
  97. None.
  98. .SH "SEE ALSO"
  99. .IR "Section 2.5" ", " "Standard I/O Streams",
  100. .IR "\fIfopen\fR\^(\|)",
  101. .IR "\fIfread\fR\^(\|)"
  102. .P
  103. The Base Definitions volume of POSIX.1\(hy2017,
  104. .IR "\fB<stdio.h>\fP",
  105. .IR "\fB<wchar.h>\fP"
  106. .\"
  107. .SH COPYRIGHT
  108. Portions of this text are reprinted and reproduced in electronic form
  109. from IEEE Std 1003.1-2017, Standard for Information Technology
  110. -- Portable Operating System Interface (POSIX), The Open Group Base
  111. Specifications Issue 7, 2018 Edition,
  112. Copyright (C) 2018 by the Institute of
  113. Electrical and Electronics Engineers, Inc and The Open Group.
  114. In the event of any discrepancy between this version and the original IEEE and
  115. The Open Group Standard, the original IEEE and The Open Group Standard
  116. is the referee document. The original Standard can be obtained online at
  117. http://www.opengroup.org/unix/online.html .
  118. .PP
  119. Any typographical or formatting errors that appear
  120. in this page are most likely
  121. to have been introduced during the conversion of the source files to
  122. man page format. To report such errors, see
  123. https://www.kernel.org/doc/man-pages/reporting_bugs.html .