OSDN Git Service

LDP: Update original to LDP v3.68
[linuxjm/LDP_man-pages.git] / original / man3 / fputwc.3
1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2 .\"
3 .\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
8 .\" %%%LICENSE_END
9 .\"
10 .\" References consulted:
11 .\"   GNU glibc-2 source code and manual
12 .\"   Dinkumware C library reference http://www.dinkumware.com/
13 .\"   OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
14 .\"   ISO/IEC 9899:1999
15 .\"
16 .TH FPUTWC 3  2013-04-19 "GNU" "Linux Programmer's Manual"
17 .SH NAME
18 fputwc, putwc \- write a wide character to a FILE stream
19 .SH SYNOPSIS
20 .nf
21 .B #include <stdio.h>
22 .br
23 .B #include <wchar.h>
24 .sp
25 .BI "wint_t fputwc(wchar_t " wc ", FILE *" stream );
26 .BI "wint_t putwc(wchar_t " wc ", FILE *" stream );
27 .fi
28 .SH DESCRIPTION
29 The
30 .BR fputwc ()
31 function is the wide-character
32 equivalent of the
33 .BR fputc (3)
34 function.
35 It writes the wide character \fIwc\fP to \fIstream\fP.
36 If
37 \fIferror(stream)\fP becomes true, it returns
38 .BR WEOF .
39 If a wide-character conversion error occurs,
40 it sets \fIerrno\fP to \fBEILSEQ\fP and returns
41 .BR WEOF .
42 Otherwise, it returns \fIwc\fP.
43 .PP
44 The
45 .BR putwc ()
46 function or macro functions identically to
47 .BR fputwc ().
48 It may be implemented as a macro, and may evaluate its argument
49 more than once.
50 There is no reason ever to use it.
51 .PP
52 For nonlocking counterparts, see
53 .BR unlocked_stdio (3).
54 .SH RETURN VALUE
55 The
56 .BR fputwc ()
57 function returns \fIwc\fP if no error occurred, or
58 .B WEOF
59 to indicate an error.
60 In the event of an error,
61 .I errno
62 is set to indicate the cause.
63 .SH ERRORS
64 Apart from the usual ones, there is
65 .TP
66 .B EILSEQ
67 Conversion of \fIwc\fP to the stream's encoding fails.
68 .SH CONFORMING TO
69 C99, POSIX.1-2001.
70 .SH NOTES
71 The behavior of
72 .BR fputwc ()
73 depends on the
74 .B LC_CTYPE
75 category of the
76 current locale.
77 .PP
78 In the absence of additional information passed to the
79 .BR fopen (3)
80 call, it is
81 reasonable to expect that
82 .BR fputwc ()
83 will actually write the multibyte
84 sequence corresponding to the wide character \fIwc\fP.
85 .SH SEE ALSO
86 .BR fgetwc (3),
87 .BR fputws (3),
88 .BR unlocked_stdio (3)
89 .SH COLOPHON
90 This page is part of release 3.68 of the Linux
91 .I man-pages
92 project.
93 A description of the project,
94 information about reporting bugs,
95 and the latest version of this page,
96 can be found at
97 \%http://www.kernel.org/doc/man\-pages/.