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

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       fputwc — put a wide-character code on a stream
13

SYNOPSIS

15       #include <stdio.h>
16       #include <wchar.h>
17
18       wint_t fputwc(wchar_t wc, FILE *stream);
19

DESCRIPTION

21       The functionality described on this reference page is aligned with  the
22       ISO C  standard.  Any  conflict between the requirements described here
23       and the ISO C standard is unintentional. This  volume  of  POSIX.1‐2017
24       defers to the ISO C standard.
25
26       The  fputwc()  function  shall write the character corresponding to the
27       wide-character code wc to the output stream pointed to  by  stream,  at
28       the  position  indicated  by the associated file-position indicator for
29       the stream (if defined), and advances the indicator  appropriately.  If
30       the  file  cannot  support  positioning  requests, or if the stream was
31       opened with append mode,  the  character  is  appended  to  the  output
32       stream. If an error occurs while writing the character, the shift state
33       of the output file is left in an undefined state.
34
35       The last data modification and last file status  change  timestamps  of
36       the file shall be marked for update between the successful execution of
37       fputwc() and the next successful completion of a call  to  fflush()  or
38       fclose() on the same stream or a call to exit() or abort().
39
40       The fputwc() function shall not change the setting of errno if success‐
41       ful.
42

RETURN VALUE

44       Upon successful completion, fputwc() shall return  wc.   Otherwise,  it
45       shall return WEOF, the error indicator for the stream shall be set, and
46       errno shall be set to indicate the error.
47

ERRORS

49       The fputwc() function shall fail if either the stream is unbuffered  or
50       data in the stream's buffer needs to be written, and:
51
52       EAGAIN The  O_NONBLOCK  flag  is set for the file descriptor underlying
53              stream and the thread would be delayed in the write operation.
54
55       EBADF  The file descriptor  underlying  stream  is  not  a  valid  file
56              descriptor open for writing.
57
58       EFBIG  An  attempt was made to write to a file that exceeds the maximum
59              file size or the file size limit of the process.
60
61       EFBIG  The file is a regular file and an attempt was made to  write  at
62              or  beyond  the offset maximum associated with the corresponding
63              stream.
64
65       EILSEQ The wide-character code wc does not correspond to a valid  char‐
66              acter.
67
68       EINTR  The  write operation was terminated due to the receipt of a sig‐
69              nal, and no data was transferred.
70
71       EIO    A physical I/O error has occurred, or the process is a member of
72              a  background  process group attempting to write to its control‐
73              ling terminal, TOSTOP is set, the calling thread is not blocking
74              SIGTTOU,  the  process  is not ignoring SIGTTOU, and the process
75              group of the process  is  orphaned.   This  error  may  also  be
76              returned under implementation-defined conditions.
77
78       ENOSPC There  was  no free space remaining on the device containing the
79              file.
80
81       EPIPE  An attempt is made to write to a pipe or FIFO that is  not  open
82              for  reading by any process. A SIGPIPE signal shall also be sent
83              to the thread.
84
85       The fputwc() function may fail if:
86
87       ENOMEM Insufficient storage space is available.
88
89       ENXIO  A request was made of a nonexistent device, or the  request  was
90              outside the capabilities of the device.
91
92       The following sections are informative.
93

EXAMPLES

95       None.
96

APPLICATION USAGE

98       None.
99

RATIONALE

101       None.
102

FUTURE DIRECTIONS

104       None.
105

SEE ALSO

107       Section   2.5,  Standard  I/O  Streams,  ferror(),  fopen(),  setbuf(),
108       ulimit()
109
110       The Base Definitions volume of POSIX.1‐2017, <stdio.h>, <wchar.h>
111
113       Portions of this text are reprinted and reproduced in  electronic  form
114       from  IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
115       table Operating System Interface (POSIX), The Open Group Base  Specifi‐
116       cations  Issue  7, 2018 Edition, Copyright (C) 2018 by the Institute of
117       Electrical and Electronics Engineers, Inc and The Open Group.   In  the
118       event of any discrepancy between this version and the original IEEE and
119       The Open Group Standard, the original IEEE and The Open Group  Standard
120       is  the  referee document. The original Standard can be obtained online
121       at http://www.opengroup.org/unix/online.html .
122
123       Any typographical or formatting errors that appear  in  this  page  are
124       most likely to have been introduced during the conversion of the source
125       files to man page format. To report such errors,  see  https://www.ker
126       nel.org/doc/man-pages/reporting_bugs.html .
127
128
129
130IEEE/The Open Group                  2017                           FPUTWC(3P)
Impressum