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.  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 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

CONFORMING TO

39       C99, POSIX.1-2001.
40

NOTES

42       The  behavior  of fputwc() depends on the LC_CTYPE category of the cur‐
43       rent locale.
44
45       In the absence of additional information passed to the  fopen(3)  call,
46       it is reasonable to expect that fputwc() will actually write the multi‐
47       byte sequence corresponding to the wide character wc.
48

SEE ALSO

50       fgetwc(3), fputws(3), unlocked_stdio(3)
51

COLOPHON

53       This page is part of release 3.53 of the Linux  man-pages  project.   A
54       description  of  the project, and information about reporting bugs, can
55       be found at http://www.kernel.org/doc/man-pages/.
56
57
58
59GNU                               2013-04-19                         FPUTWC(3)
Impressum