1FPUTWC(3) Linux Programmer's Manual FPUTWC(3)
2
3
4
6 fputwc, putwc - write a wide character to a FILE stream
7
9 #include <stdio.h>
10 #include <wchar.h>
11
12 wint_t fputwc(wchar_t wc, FILE *stream);
13 wint_t putwc(wchar_t wc, FILE *stream);
14
16 The fputwc() function is the wide-character equivalent of the fputc(3)
17 function. It writes the wide character wc to stream. If fer‐
18 ror(stream) becomes true, it returns WEOF. If a wide-character conver‐
19 sion error occurs, it sets errno to EILSEQ and returns WEOF. Otherwise
20 it returns wc.
21
22 The putwc() function or macro functions identically to fputwc(). It
23 may be implemented as a macro, and may evaluate its argument more than
24 once. There is no reason ever to use it.
25
26 For non-locking counterparts, see unlocked_stdio(3).
27
29 The fputwc() function returns wc if no error occurred, or WEOF to indi‐
30 cate an error.
31
33 Apart from the usual ones, there is
34
35 EILSEQ Conversion of wc to the stream's encoding fails.
36
38 C99, POSIX.1-2001.
39
41 The behavior of fputwc() depends on the LC_CTYPE category of the cur‐
42 rent locale.
43
44 In the absence of additional information passed to the fopen(3) call,
45 it is reasonable to expect that fputwc() will actually write the multi‐
46 byte sequence corresponding to the wide character wc.
47
49 fgetwc(3), fputws(3), unlocked_stdio(3)
50
52 This page is part of release 3.22 of the Linux man-pages project. A
53 description of the project, and information about reporting bugs, can
54 be found at http://www.kernel.org/doc/man-pages/.
55
56
57
58GNU 1999-07-25 FPUTWC(3)