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.

128 satır
5.7KB

  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>siprintf (The Red Hat newlib C Library)</title>
  7. <meta name="description" content="siprintf (The Red Hat newlib C Library)">
  8. <meta name="keywords" content="siprintf (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="siscanf.html#siscanf" rel="next" title="siscanf">
  17. <link href="setvbuf.html#setvbuf" rel="prev" title="setvbuf">
  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="siprintf"></a>
  48. <div class="header">
  49. <p>
  50. Next: <a href="siscanf.html#siscanf" accesskey="n" rel="next">siscanf</a>, Previous: <a href="setvbuf.html#setvbuf" accesskey="p" rel="prev">setvbuf</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="siprintf_002c-fiprintf_002c-iprintf_002c-sniprintf_002c-asiprintf_002c-asniprintf_002d_002d_002dformat-output-_0028integer-only_0029"></a>
  54. <h3 class="section">4.59 <code>siprintf</code>, <code>fiprintf</code>, <code>iprintf</code>, <code>sniprintf</code>, <code>asiprintf</code>, <code>asniprintf</code>&mdash;format output (integer only)</h3>
  55. <a name="index-fiprintf"></a>
  56. <a name="index-_005ffiprintf_005fr"></a>
  57. <a name="index-iprintf"></a>
  58. <a name="index-_005fiprintf_005fr"></a>
  59. <a name="index-siprintf"></a>
  60. <a name="index-_005fsiprintf_005fr"></a>
  61. <a name="index-sniprintf"></a>
  62. <a name="index-_005fsniprintf_005fr"></a>
  63. <a name="index-asiprintf"></a>
  64. <a name="index-_005fasiprintf_005fr"></a>
  65. <a name="index-asniprintf"></a>
  66. <a name="index-_005fasniprintf_005fr"></a>
  67. <p><strong>Synopsis</strong>
  68. </p><div class="example">
  69. <pre class="example">#include &lt;stdio.h&gt;
  70. int iprintf(const char *<var>format</var>, ...);
  71. int fiprintf(FILE *<var>fd</var>, const char *<var>format</var> , ...);
  72. int siprintf(char *<var>str</var>, const char *<var>format</var>, ...);
  73. int sniprintf(char *<var>str</var>, size_t <var>size</var>, const char *<var>format</var>,
  74. ...);
  75. int asiprintf(char **<var>strp</var>, const char *<var>format</var>, ...);
  76. char *asniprintf(char *<var>str</var>, size_t *<var>size</var>,
  77. const char *<var>format</var>, ...);
  78. int _iprintf_r(struct _reent *<var>ptr</var>, const char *<var>format</var>, ...);
  79. int _fiprintf_r(struct _reent *<var>ptr</var>, FILE *<var>fd</var>,
  80. const char *<var>format</var>, ...);
  81. int _siprintf_r(struct _reent *<var>ptr</var>, char *<var>str</var>,
  82. const char *<var>format</var>, ...);
  83. int _sniprintf_r(struct _reent *<var>ptr</var>, char *<var>str</var>, size_t <var>size</var>,
  84. const char *<var>format</var>, ...);
  85. int _asiprintf_r(struct _reent *<var>ptr</var>, char **<var>strp</var>,
  86. const char *<var>format</var>, ...);
  87. char *_asniprintf_r(struct _reent *<var>ptr</var>, char *<var>str</var>,
  88. size_t *<var>size</var>, const char *<var>format</var>, ...);
  89. </pre></div>
  90. <p><strong>Description</strong><br>
  91. <code>iprintf</code>, <code>fiprintf</code>, <code>siprintf</code>, <code>sniprintf</code>,
  92. <code>asiprintf</code>, and <code>asniprintf</code> are the same as <code>printf</code>,
  93. <code>fprintf</code>, <code>sprintf</code>, <code>snprintf</code>, <code>asprintf</code>, and
  94. <code>asnprintf</code>, respectively, except that they restrict usage
  95. to non-floating-point format specifiers.
  96. </p>
  97. <p><code>_iprintf_r</code>, <code>_fiprintf_r</code>, <code>_asiprintf_r</code>,
  98. <code>_siprintf_r</code>, <code>_sniprintf_r</code>, <code>_asniprintf_r</code> are
  99. simply reentrant versions of the functions above.
  100. </p>
  101. <br>
  102. <p><strong>Returns</strong><br>
  103. Similar to <code>printf</code>, <code>fprintf</code>, <code>sprintf</code>, <code>snprintf</code>, <code>asprintf</code>,
  104. and <code>asnprintf</code>.
  105. </p>
  106. <br>
  107. <p><strong>Portability</strong><br>
  108. <code>iprintf</code>, <code>fiprintf</code>, <code>siprintf</code>, <code>sniprintf</code>, <code>asiprintf</code>,
  109. and <code>asniprintf</code> are newlib extensions.
  110. </p>
  111. <p>Supporting OS subroutines required: <code>close</code>, <code>fstat</code>, <code>isatty</code>,
  112. <code>lseek</code>, <code>read</code>, <code>sbrk</code>, <code>write</code>.
  113. </p>
  114. <br>
  115. </body>
  116. </html>