• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/toolchains/hndtools-armeabi-2011.09/share/doc/arm-arm-none-eabi/html/libc/
1<html lang="en">
2<head>
3<title>fputwc - Untitled</title>
4<meta http-equiv="Content-Type" content="text/html">
5<meta name="description" content="Untitled">
6<meta name="generator" content="makeinfo 4.13">
7<link title="Top" rel="start" href="index.html#Top">
8<link rel="up" href="Stdio.html#Stdio" title="Stdio">
9<link rel="prev" href="fputs.html#fputs" title="fputs">
10<link rel="next" href="fputws.html#fputws" title="fputws">
11<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
12<meta http-equiv="Content-Style-Type" content="text/css">
13<style type="text/css"><!--
14  pre.display { font-family:inherit }
15  pre.format  { font-family:inherit }
16  pre.smalldisplay { font-family:inherit; font-size:smaller }
17  pre.smallformat  { font-family:inherit; font-size:smaller }
18  pre.smallexample { font-size:smaller }
19  pre.smalllisp    { font-size:smaller }
20  span.sc    { font-variant:small-caps }
21  span.roman { font-family:serif; font-weight:normal; } 
22  span.sansserif { font-family:sans-serif; font-weight:normal; } 
23--></style>
24<link rel="stylesheet" type="text/css" href="../cs.css">
25</head>
26<body>
27<div class="node">
28<a name="fputwc"></a>
29<p>
30Next:&nbsp;<a rel="next" accesskey="n" href="fputws.html#fputws">fputws</a>,
31Previous:&nbsp;<a rel="previous" accesskey="p" href="fputs.html#fputs">fputs</a>,
32Up:&nbsp;<a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
33<hr>
34</div>
35
36<h3 class="section">4.22 <code>fputwc</code>, <code>putwc</code>&mdash;write a wide character on a stream or file</h3>
37
38<p><a name="index-fputwc-187"></a><a name="index-g_t_005ffputwc_005fr-188"></a><a name="index-putwc-189"></a><a name="index-g_t_005fputwc_005fr-190"></a><strong>Synopsis</strong>
39<pre class="example">     #include &lt;stdio.h&gt;
40     #include &lt;wchar.h&gt;
41     wint_t fputwc(wchar_t <var>wc</var>, FILE *<var>fp</var>);
42     
43     #include &lt;stdio.h&gt;
44     #include &lt;wchar.h&gt;
45     wint_t _fputwc_r(struct _reent *<var>ptr</var>, wchar_t <var>wc</var>, FILE *<var>fp</var>);
46     
47     #include &lt;stdio.h&gt;
48     #include &lt;wchar.h&gt;
49     wint_t putwc(wchar_t <var>wc</var>, FILE *<var>fp</var>);
50     
51     #include &lt;stdio.h&gt;
52     #include &lt;wchar.h&gt;
53     wint_t _putwc_r(struct _reent *<var>ptr</var>, wchar_t <var>wc</var>, FILE *<var>fp</var>);
54     
55</pre>
56   <p><strong>Description</strong><br>
57<code>fputwc</code> writes the wide character argument <var>wc</var> to the file or
58stream identified by <var>fp</var>.
59
60   <p>If the file was opened with append mode (or if the stream cannot
61support positioning), then the new wide character goes at the end of the
62file or stream.  Otherwise, the new wide character is written at the
63current value of the position indicator, and the position indicator
64oadvances by one.
65
66   <p>The <code>putwc</code> function or macro functions identically to <code>fputwc</code>.  It
67may be implemented as a macro, and may evaluate its argument more than
68once. There is no reason ever to use it.
69
70   <p>The <code>_fputwc_r</code> and <code>_putwc_r</code> functions are simply reentrant versions
71of <code>fputwc</code> and <code>putwc</code> that take an additional reentrant structure
72argument: <var>ptr</var>.
73
74   <p><br>
75<strong>Returns</strong><br>
76If successful, <code>fputwc</code> and <code>putwc</code> return their argument <var>wc</var>. 
77If an error intervenes, the result is <code>EOF</code>.  You can use
78`<code>ferror(</code><var>fp</var><code>)</code>' to query for errors.
79
80   <p><br>
81<strong>Portability</strong><br>
82C99, POSIX.1-2001
83
84   <p><br>
85
86   </body></html>
87
88