選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

135 行
6.4KB

  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>vfprintf (The Red Hat newlib C Library)</title>
  7. <meta name="description" content="vfprintf (The Red Hat newlib C Library)">
  8. <meta name="keywords" content="vfprintf (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="vfscanf.html#vfscanf" rel="next" title="vfscanf">
  17. <link href="ungetwc.html#ungetwc" rel="prev" title="ungetwc">
  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="vfprintf"></a>
  48. <div class="header">
  49. <p>
  50. Next: <a href="vfscanf.html#vfscanf" accesskey="n" rel="next">vfscanf</a>, Previous: <a href="ungetwc.html#ungetwc" accesskey="p" rel="prev">ungetwc</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="vfprintf_002c-vprintf_002c-vsprintf_002c-vsnprintf_002c-vasprintf_002c-vasnprintf_002d_002d_002dformat-argument-list"></a>
  54. <h3 class="section">4.70 <code>vfprintf</code>, <code>vprintf</code>, <code>vsprintf</code>, <code>vsnprintf</code>, <code>vasprintf</code>, <code>vasnprintf</code>&mdash;format argument list</h3>
  55. <a name="index-vfprintf"></a>
  56. <a name="index-_005fvfprintf_005fr"></a>
  57. <a name="index-vprintf"></a>
  58. <a name="index-_005fvprintf_005fr"></a>
  59. <a name="index-vsprintf"></a>
  60. <a name="index-_005fvsprintf_005fr"></a>
  61. <a name="index-vsnprintf"></a>
  62. <a name="index-_005fvsnprintf_005fr"></a>
  63. <a name="index-vasprintf"></a>
  64. <a name="index-_005fvasprintf_005fr"></a>
  65. <a name="index-vasnprintf"></a>
  66. <a name="index-_005fvasnprintf_005fr"></a>
  67. <p><strong>Synopsis</strong>
  68. </p><div class="example">
  69. <pre class="example">#include &lt;stdio.h&gt;
  70. #include &lt;stdarg.h&gt;
  71. int vprintf(const char *<var>fmt</var>, va_list <var>list</var>);
  72. int vfprintf(FILE *<var>fp</var>, const char *<var>fmt</var>, va_list <var>list</var>);
  73. int vsprintf(char *<var>str</var>, const char *<var>fmt</var>, va_list <var>list</var>);
  74. int vsnprintf(char *<var>str</var>, size_t <var>size</var>, const char *<var>fmt</var>,
  75. va_list <var>list</var>);
  76. int vasprintf(char **<var>strp</var>, const char *<var>fmt</var>, va_list <var>list</var>);
  77. char *vasnprintf(char *<var>str</var>, size_t *<var>size</var>, const char *<var>fmt</var>,
  78. va_list <var>list</var>);
  79. int _vprintf_r(struct _reent *<var>reent</var>, const char *<var>fmt</var>,
  80. va_list <var>list</var>);
  81. int _vfprintf_r(struct _reent *<var>reent</var>, FILE *<var>fp</var>,
  82. const char *<var>fmt</var>, va_list <var>list</var>);
  83. int _vsprintf_r(struct _reent *<var>reent</var>, char *<var>str</var>,
  84. const char *<var>fmt</var>, va_list <var>list</var>);
  85. int _vasprintf_r(struct _reent *<var>reent</var>, char **<var>str</var>,
  86. const char *<var>fmt</var>, va_list <var>list</var>);
  87. int _vsnprintf_r(struct _reent *<var>reent</var>, char *<var>str</var>,
  88. size_t <var>size</var>, const char *<var>fmt</var>, va_list <var>list</var>);
  89. char *_vasnprintf_r(struct _reent *<var>reent</var>, char *<var>str</var>,
  90. size_t *<var>size</var>, const char *<var>fmt</var>, va_list <var>list</var>);
  91. </pre></div>
  92. <p><strong>Description</strong><br>
  93. <code>vprintf</code>, <code>vfprintf</code>, <code>vasprintf</code>, <code>vsprintf</code>, <code>vsnprintf</code>,
  94. and <code>vasnprintf</code> are (respectively) variants of <code>printf</code>,
  95. <code>fprintf</code>, <code>asprintf</code>, <code>sprintf</code>, <code>snprintf</code>, and
  96. <code>asnprintf</code>. They differ only in allowing their caller to pass the
  97. variable argument list as a <code>va_list</code> object (initialized by
  98. <code>va_start</code>) rather than directly accepting a variable number of
  99. arguments. The caller is responsible for calling <code>va_end</code>.
  100. </p>
  101. <p><code>_vprintf_r</code>, <code>_vfprintf_r</code>, <code>_vasprintf_r</code>, <code>_vsprintf_r</code>,
  102. <code>_vsnprintf_r</code>, and <code>_vasnprintf_r</code> are reentrant versions of the
  103. above.
  104. </p>
  105. <br>
  106. <p><strong>Returns</strong><br>
  107. The return values are consistent with the corresponding functions.
  108. </p>
  109. <br>
  110. <p><strong>Portability</strong><br>
  111. ANSI C requires <code>vprintf</code>, <code>vfprintf</code>, <code>vsprintf</code>, and
  112. <code>vsnprintf</code>. The remaining functions are newlib extensions.
  113. </p>
  114. <p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>,
  115. <code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
  116. </p>
  117. <br>
  118. <hr>
  119. <div class="header">
  120. <p>
  121. Next: <a href="vfscanf.html#vfscanf" accesskey="n" rel="next">vfscanf</a>, Previous: <a href="ungetwc.html#ungetwc" accesskey="p" rel="prev">ungetwc</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>
  122. </div>
  123. </body>
  124. </html>