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

NAME

6       fputwc - 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()
17       function. It writes the wide character wc to stream. If  ferror(stream)
18       becomes  true,  it  returns  WEOF. If a wide character conversion error
19       occurs, it sets errno to EILSEQ and returns WEOF.  Otherwise it returns
20       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

RETURN VALUE

29       The fputwc() function returns wc if no error occurred, or WEOF to indi‐
30       cate an error.
31

ERRORS

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

CONFORMING TO

38       C99, POSIX.1-2001.
39

NOTES

41       The behaviour 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() call, it
45       is reasonable to expect that fputwc() will actually write the multibyte
46       sequence corresponding to the wide character wc.
47

SEE ALSO

49       fgetwc(3), fputws(3), unlocked_stdio(3)
50
51
52
53GNU                               1999-07-25                         FPUTWC(3)
Impressum