1FPUTWC(3)                  Linux Programmer's Manual                 FPUTWC(3)
2
3
4

NAME

6       fputwc, putwc - write a wide character to a FILE stream
7

SYNOPSIS

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

DESCRIPTION

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.   Other‐
20       wise, 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 nonlocking counterparts, see unlocked_stdio(3).
27

RETURN VALUE

29       The fputwc() function returns wc if no error occurred, or WEOF to indi‐
30       cate an error.  In the event of an error, errno is set to indicate  the
31       cause.
32

ERRORS

34       Apart from the usual ones, there is
35
36       EILSEQ Conversion of wc to the stream's encoding fails.
37

ATTRIBUTES

39       For   an   explanation   of   the  terms  used  in  this  section,  see
40       attributes(7).
41
42       ┌──────────────────┬───────────────┬─────────┐
43Interface         Attribute     Value   
44       ├──────────────────┼───────────────┼─────────┤
45fputwc(), putwc() │ Thread safety │ MT-Safe │
46       └──────────────────┴───────────────┴─────────┘
47

CONFORMING TO

49       POSIX.1-2001, POSIX.1-2008, C99.
50

NOTES

52       The behavior of fputwc() depends on the LC_CTYPE category of  the  cur‐
53       rent locale.
54
55       In  the  absence of additional information passed to the fopen(3) call,
56       it is reasonable to expect that fputwc() will actually write the multi‐
57       byte sequence corresponding to the wide character wc.
58

SEE ALSO

60       fgetwc(3), fputws(3), unlocked_stdio(3)
61

COLOPHON

63       This  page  is  part of release 4.16 of the Linux man-pages project.  A
64       description of the project, information about reporting bugs,  and  the
65       latest     version     of     this    page,    can    be    found    at
66       https://www.kernel.org/doc/man-pages/.
67
68
69
70GNU                               2017-09-15                         FPUTWC(3)
Impressum