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

fputwc.3p (4920B)


  1. '\" et
  2. .TH FPUTWC "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. fputwc
  12. \(em put a wide-character code on a stream
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <stdio.h>
  17. #include <wchar.h>
  18. .P
  19. wint_t fputwc(wchar_t \fIwc\fP, FILE *\fIstream\fP);
  20. .fi
  21. .SH DESCRIPTION
  22. The functionality described on this reference page is aligned with the
  23. ISO\ C standard. Any conflict between the requirements described here and the
  24. ISO\ C standard is unintentional. This volume of POSIX.1\(hy2017 defers to the ISO\ C standard.
  25. .P
  26. The
  27. \fIfputwc\fR()
  28. function shall write the character corresponding to the wide-character
  29. code
  30. .IR wc
  31. to the output stream pointed to by
  32. .IR stream ,
  33. at the position indicated by the associated file-position indicator for
  34. the stream (if defined), and advances the indicator appropriately. If
  35. the file cannot support positioning requests, or if the stream was
  36. opened with append mode, the character is appended to the output
  37. stream. If an error occurs while writing the character, the shift
  38. state of the output file is left in an undefined state.
  39. .P
  40. The last data modification and last file status change timestamps
  41. of the file shall be marked for update between the successful
  42. execution of
  43. \fIfputwc\fR()
  44. and the next successful completion of a call to
  45. \fIfflush\fR()
  46. or
  47. \fIfclose\fR()
  48. on the same stream or a call to
  49. \fIexit\fR()
  50. or
  51. \fIabort\fR().
  52. .P
  53. The
  54. \fIfputwc\fR()
  55. function shall not change the setting of
  56. .IR errno
  57. if successful.
  58. .SH "RETURN VALUE"
  59. Upon successful completion,
  60. \fIfputwc\fR()
  61. shall return
  62. .IR wc .
  63. Otherwise, it shall return WEOF, the error indicator for the stream shall
  64. be set,
  65. and
  66. .IR errno
  67. shall be set to indicate the error.
  68. .SH ERRORS
  69. The
  70. \fIfputwc\fR()
  71. function shall fail if either the stream is unbuffered or data in the
  72. .IR stream 's
  73. buffer needs to be written, and:
  74. .TP
  75. .BR EAGAIN
  76. The O_NONBLOCK flag is set for the file descriptor underlying
  77. .IR stream
  78. and the thread would be delayed in the write operation.
  79. .TP
  80. .BR EBADF
  81. The file descriptor underlying
  82. .IR stream
  83. is not a valid file descriptor open for writing.
  84. .TP
  85. .BR EFBIG
  86. An attempt was made to write to a file that exceeds the maximum file
  87. size or the file size limit of the process.
  88. .TP
  89. .BR EFBIG
  90. The file is a regular file and an attempt was made to write at or
  91. beyond the offset maximum associated with the corresponding stream.
  92. .TP
  93. .BR EILSEQ
  94. The wide-character code
  95. .IR wc
  96. does not correspond to a valid character.
  97. .TP
  98. .BR EINTR
  99. The write operation was terminated due to the receipt of a signal, and
  100. no data was transferred.
  101. .TP
  102. .BR EIO
  103. A physical I/O error has occurred, or the process is a member of a
  104. background process group attempting to write to its controlling terminal,
  105. TOSTOP is set, the calling thread is not blocking SIGTTOU, the process
  106. is not ignoring SIGTTOU, and the process group of the process is orphaned.
  107. This error may also be returned under implementation-defined conditions.
  108. .TP
  109. .BR ENOSPC
  110. There was no free space remaining on the device containing the file.
  111. .TP
  112. .BR EPIPE
  113. An attempt is made to write to a pipe or FIFO that is not open for
  114. reading by any process. A SIGPIPE signal shall also be sent to the
  115. thread.
  116. .P
  117. The
  118. \fIfputwc\fR()
  119. function may fail if:
  120. .TP
  121. .BR ENOMEM
  122. Insufficient storage space is available.
  123. .TP
  124. .BR ENXIO
  125. A request was made of a nonexistent device, or the request was
  126. outside the capabilities of the device.
  127. .LP
  128. .IR "The following sections are informative."
  129. .SH EXAMPLES
  130. None.
  131. .SH "APPLICATION USAGE"
  132. None.
  133. .SH RATIONALE
  134. None.
  135. .SH "FUTURE DIRECTIONS"
  136. None.
  137. .SH "SEE ALSO"
  138. .IR "Section 2.5" ", " "Standard I/O Streams",
  139. .IR "\fIferror\fR\^(\|)",
  140. .IR "\fIfopen\fR\^(\|)",
  141. .IR "\fIsetbuf\fR\^(\|)",
  142. .IR "\fIulimit\fR\^(\|)"
  143. .P
  144. The Base Definitions volume of POSIX.1\(hy2017,
  145. .IR "\fB<stdio.h>\fP",
  146. .IR "\fB<wchar.h>\fP"
  147. .\"
  148. .SH COPYRIGHT
  149. Portions of this text are reprinted and reproduced in electronic form
  150. from IEEE Std 1003.1-2017, Standard for Information Technology
  151. -- Portable Operating System Interface (POSIX), The Open Group Base
  152. Specifications Issue 7, 2018 Edition,
  153. Copyright (C) 2018 by the Institute of
  154. Electrical and Electronics Engineers, Inc and The Open Group.
  155. In the event of any discrepancy between this version and the original IEEE and
  156. The Open Group Standard, the original IEEE and The Open Group Standard
  157. is the referee document. The original Standard can be obtained online at
  158. http://www.opengroup.org/unix/online.html .
  159. .PP
  160. Any typographical or formatting errors that appear
  161. in this page are most likely
  162. to have been introduced during the conversion of the source files to
  163. man page format. To report such errors, see
  164. https://www.kernel.org/doc/man-pages/reporting_bugs.html .