Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

114 linhas
4.6KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <title>putwchar (The Red Hat newlib C Library)</title>
  7. <meta name="description" content="putwchar (The Red Hat newlib C Library)">
  8. <meta name="keywords" content="putwchar (The Red Hat newlib C Library)">
  9. <meta name="resource-type" content="document">
  10. <meta name="distribution" content="global">
  11. <meta name="Generator" content="makeinfo">
  12. <link href="index.html#Top" rel="start" title="Top">
  13. <link href="Document-Index.html#Document-Index" rel="index" title="Document Index">
  14. <link href="Document-Index.html#SEC_Contents" rel="contents" title="Table of Contents">
  15. <link href="Stdio.html#Stdio" rel="up" title="Stdio">
  16. <link href="remove.html#remove" rel="next" title="remove">
  17. <link href="putw.html#putw" rel="prev" title="putw">
  18. <style type="text/css">
  19. <!--
  20. a.summary-letter {text-decoration: none}
  21. blockquote.indentedblock {margin-right: 0em}
  22. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  23. blockquote.smallquotation {font-size: smaller}
  24. div.display {margin-left: 3.2em}
  25. div.example {margin-left: 3.2em}
  26. div.lisp {margin-left: 3.2em}
  27. div.smalldisplay {margin-left: 3.2em}
  28. div.smallexample {margin-left: 3.2em}
  29. div.smalllisp {margin-left: 3.2em}
  30. kbd {font-style: oblique}
  31. pre.display {font-family: inherit}
  32. pre.format {font-family: inherit}
  33. pre.menu-comment {font-family: serif}
  34. pre.menu-preformatted {font-family: serif}
  35. pre.smalldisplay {font-family: inherit; font-size: smaller}
  36. pre.smallexample {font-size: smaller}
  37. pre.smallformat {font-family: inherit; font-size: smaller}
  38. pre.smalllisp {font-size: smaller}
  39. span.nolinebreak {white-space: nowrap}
  40. span.roman {font-family: initial; font-weight: normal}
  41. span.sansserif {font-family: sans-serif; font-weight: normal}
  42. ul.no-bullet {list-style: none}
  43. -->
  44. </style>
  45. </head>
  46. <body lang="en">
  47. <a name="putwchar"></a>
  48. <div class="header">
  49. <p>
  50. Next: <a href="remove.html#remove" accesskey="n" rel="next">remove</a>, Previous: <a href="putw.html#putw" accesskey="p" rel="prev">putw</a>, Up: <a href="Stdio.html#Stdio" accesskey="u" rel="up">Stdio</a> &nbsp; [<a href="Document-Index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Document-Index.html#Document-Index" title="Index" rel="index">Index</a>]</p>
  51. </div>
  52. <hr>
  53. <a name="putwchar_002c-putwchar_005funlocked_002d_002d_002dwrite-a-wide-character-to-standard-output"></a>
  54. <h3 class="section">4.51 <code>putwchar</code>, <code>putwchar_unlocked</code>&mdash;write a wide character to standard output</h3>
  55. <a name="index-putwchar"></a>
  56. <a name="index-putwchar_005funlocked"></a>
  57. <a name="index-_005fputwchar_005fr"></a>
  58. <a name="index-_005fputwchar_005funlocked_005fr"></a>
  59. <p><strong>Synopsis</strong>
  60. </p><div class="example">
  61. <pre class="example">#include &lt;wchar.h&gt;
  62. wint_t putwchar(wchar_t <var>wc</var>);
  63. #include &lt;wchar.h&gt;
  64. wint_t putwchar_unlocked(wchar_t <var>wc</var>);
  65. #include &lt;wchar.h&gt;
  66. wint_t _putwchar_r(struct _reent *<var>reent</var>, wchar_t <var>wc</var>);
  67. #include &lt;wchar.h&gt;
  68. wint_t _putwchar_unlocked_r(struct _reent *<var>reent</var>, wchar_t <var>wc</var>);
  69. </pre></div>
  70. <p><strong>Description</strong><br>
  71. The <code>putwchar</code> function or macro is the wide-character equivalent of
  72. the <code>putchar</code> function. It writes the wide character wc to stdout.
  73. </p>
  74. <p><code>putwchar_unlocked</code> is a non-thread-safe version of <code>putwchar</code>.
  75. <code>putwchar_unlocked</code> may only safely be used within a scope
  76. protected by flockfile() (or ftrylockfile()) and funlockfile(). This
  77. function may safely be used in a multi-threaded program if and only
  78. if they are called while the invoking thread owns the (FILE *)
  79. object, as is the case after a successful call to the flockfile() or
  80. ftrylockfile() functions. If threads are disabled, then
  81. <code>putwchar_unlocked</code> is equivalent to <code>putwchar</code>.
  82. </p>
  83. <p>The alternate functions <code>_putwchar_r</code> and <code>_putwchar_unlocked_r</code> are
  84. reentrant versions of the above. The extra argument <var>reent</var> is a pointer
  85. to a reentrancy structure.
  86. </p>
  87. <br>
  88. <p><strong>Returns</strong><br>
  89. If successful, <code>putwchar</code> returns its argument <var>wc</var>. If an error
  90. intervenes, the result is <code>EOF</code>. You can use &lsquo;<code>ferror(stdin)</code>&rsquo; to
  91. query for errors.
  92. </p>
  93. <br>
  94. <p><strong>Portability</strong><br>
  95. <code>putwchar</code> is required by C99.
  96. </p>
  97. <p><code>putwchar_unlocked</code> is a GNU extension.
  98. </p>
  99. <br>
  100. </body>
  101. </html>