No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

117 líneas
4.8KB

  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>vfscanf (The Red Hat newlib C Library)</title>
  7. <meta name="description" content="vfscanf (The Red Hat newlib C Library)">
  8. <meta name="keywords" content="vfscanf (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="vfwprintf.html#vfwprintf" rel="next" title="vfwprintf">
  17. <link href="vfprintf.html#vfprintf" rel="prev" title="vfprintf">
  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="vfscanf"></a>
  48. <div class="header">
  49. <p>
  50. Next: <a href="vfwprintf.html#vfwprintf" accesskey="n" rel="next">vfwprintf</a>, Previous: <a href="vfprintf.html#vfprintf" accesskey="p" rel="prev">vfprintf</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="vfscanf_002c-vscanf_002c-vsscanf_002d_002d_002dformat-argument-list"></a>
  54. <h3 class="section">4.71 <code>vfscanf</code>, <code>vscanf</code>, <code>vsscanf</code>&mdash;format argument list</h3>
  55. <a name="index-vfscanf"></a>
  56. <a name="index-_005fvfscanf_005fr"></a>
  57. <a name="index-vscanf"></a>
  58. <a name="index-_005fvscanf_005fr"></a>
  59. <a name="index-vsscanf"></a>
  60. <a name="index-_005fvsscanf_005fr"></a>
  61. <p><strong>Synopsis</strong>
  62. </p><div class="example">
  63. <pre class="example">#include &lt;stdio.h&gt;
  64. #include &lt;stdarg.h&gt;
  65. int vscanf(const char *<var>fmt</var>, va_list <var>list</var>);
  66. int vfscanf(FILE *<var>fp</var>, const char *<var>fmt</var>, va_list <var>list</var>);
  67. int vsscanf(const char *<var>str</var>, const char *<var>fmt</var>, va_list <var>list</var>);
  68. int _vscanf_r(struct _reent *<var>reent</var>, const char *<var>fmt</var>,
  69. va_list <var>list</var>);
  70. int _vfscanf_r(struct _reent *<var>reent</var>, FILE *<var>fp</var>, const char *<var>fmt</var>,
  71. va_list <var>list</var>);
  72. int _vsscanf_r(struct _reent *<var>reent</var>, const char *<var>str</var>,
  73. const char *<var>fmt</var>, va_list <var>list</var>);
  74. </pre></div>
  75. <p><strong>Description</strong><br>
  76. <code>vscanf</code>, <code>vfscanf</code>, and <code>vsscanf</code> are (respectively) variants
  77. of <code>scanf</code>, <code>fscanf</code>, and <code>sscanf</code>. They differ only in
  78. allowing their caller to pass the variable argument list as a
  79. <code>va_list</code> object (initialized by <code>va_start</code>) rather than
  80. directly accepting a variable number of arguments.
  81. </p>
  82. <br>
  83. <p><strong>Returns</strong><br>
  84. The return values are consistent with the corresponding functions:
  85. <code>vscanf</code> returns the number of input fields successfully scanned,
  86. converted, and stored; the return value does not include scanned
  87. fields which were not stored.
  88. </p>
  89. <p>If <code>vscanf</code> attempts to read at end-of-file, the return value
  90. is <code>EOF</code>.
  91. </p>
  92. <p>If no fields were stored, the return value is <code>0</code>.
  93. </p>
  94. <p>The routines <code>_vscanf_r</code>, <code>_vfscanf_f</code>, and <code>_vsscanf_r</code> are
  95. reentrant versions which take an additional first parameter which points to the
  96. reentrancy structure.
  97. </p>
  98. <br>
  99. <p><strong>Portability</strong><br>
  100. These are GNU extensions.
  101. </p>
  102. <p>Supporting OS subroutines required:
  103. </p>
  104. <br>
  105. </body>
  106. </html>