You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

134 line
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>viprintf (The Red Hat newlib C Library)</title>
  7. <meta name="description" content="viprintf (The Red Hat newlib C Library)">
  8. <meta name="keywords" content="viprintf (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="viscanf.html#viscanf" rel="next" title="viscanf">
  17. <link href="vfwscanf.html#vfwscanf" rel="prev" title="vfwscanf">
  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="viprintf"></a>
  48. <div class="header">
  49. <p>
  50. Next: <a href="viscanf.html#viscanf" accesskey="n" rel="next">viscanf</a>, Previous: <a href="vfwscanf.html#vfwscanf" accesskey="p" rel="prev">vfwscanf</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="viprintf_002c-vfiprintf_002c-vsiprintf_002c-vsniprintf_002c-vasiprintf_002c-vasniprintf_002d_002d_002dformat-argument-list-_0028integer-only_0029"></a>
  54. <h3 class="section">4.74 <code>viprintf</code>, <code>vfiprintf</code>, <code>vsiprintf</code>, <code>vsniprintf</code>, <code>vasiprintf</code>, <code>vasniprintf</code>&mdash;format argument list (integer only)</h3>
  55. <a name="index-viprintf"></a>
  56. <a name="index-_005fviprintf_005fr"></a>
  57. <a name="index-vfiprintf"></a>
  58. <a name="index-_005fvfiprintf_005fr"></a>
  59. <a name="index-vsiprintf"></a>
  60. <a name="index-_005fvsiprintf_005fr"></a>
  61. <a name="index-vsniprintf"></a>
  62. <a name="index-_005fvsniprintf_005fr"></a>
  63. <a name="index-vasiprintf"></a>
  64. <a name="index-_005fvasiprintf_005fr"></a>
  65. <a name="index-vasniprintf"></a>
  66. <a name="index-_005fvasniprintf_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 viprintf(const char *<var>fmt</var>, va_list <var>list</var>);
  72. int vfiprintf(FILE *<var>fp</var>, const char *<var>fmt</var>, va_list <var>list</var>);
  73. int vsiprintf(char *<var>str</var>, const char *<var>fmt</var>, va_list <var>list</var>);
  74. int vsniprintf(char *<var>str</var>, size_t <var>size</var>, const char *<var>fmt</var>,
  75. va_list <var>list</var>);
  76. int vasiprintf(char **<var>strp</var>, const char *<var>fmt</var>, va_list <var>list</var>);
  77. char *vasniprintf(char *<var>str</var>, size_t *<var>size</var>, const char *<var>fmt</var>,
  78. va_list <var>list</var>);
  79. int _viprintf_r(struct _reent *<var>reent</var>, const char *<var>fmt</var>,
  80. va_list <var>list</var>);
  81. int _vfiprintf_r(struct _reent *<var>reent</var>, FILE *<var>fp</var>,
  82. const char *<var>fmt</var>, va_list <var>list</var>);
  83. int _vsiprintf_r(struct _reent *<var>reent</var>, char *<var>str</var>,
  84. const char *<var>fmt</var>, va_list <var>list</var>);
  85. int _vsniprintf_r(struct _reent *<var>reent</var>, char *<var>str</var>,
  86. size_t <var>size</var>, const char *<var>fmt</var>, va_list <var>list</var>);
  87. int _vasiprintf_r(struct _reent *<var>reent</var>, char **<var>str</var>,
  88. const char *<var>fmt</var>, va_list <var>list</var>);
  89. char *_vasniprintf_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>viprintf</code>, <code>vfiprintf</code>, <code>vasiprintf</code>, <code>vsiprintf</code>,
  94. <code>vsniprintf</code>, and <code>vasniprintf</code> are (respectively) variants of
  95. <code>iprintf</code>, <code>fiprintf</code>, <code>asiprintf</code>, <code>siprintf</code>, <code>sniprintf</code>,
  96. and <code>asniprintf</code>. They differ only in allowing their caller to pass
  97. the 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>_viprintf_r</code>, <code>_vfiprintf_r</code>, <code>_vasiprintf_r</code>,
  102. <code>_vsiprintf_r</code>, <code>_vsniprintf_r</code>, and <code>_vasniprintf_r</code> are
  103. reentrant versions of the 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. All of these functions are newlib extensions.
  112. </p>
  113. <p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>,
  114. <code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
  115. </p>
  116. <br>
  117. <hr>
  118. <div class="header">
  119. <p>
  120. Next: <a href="viscanf.html#viscanf" accesskey="n" rel="next">viscanf</a>, Previous: <a href="vfwscanf.html#vfwscanf" accesskey="p" rel="prev">vfwscanf</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>
  121. </div>
  122. </body>
  123. </html>