| <html lang="en"> |
| <head> |
| <title>viscanf - Untitled</title> |
| <meta http-equiv="Content-Type" content="text/html"> |
| <meta name="description" content="Untitled"> |
| <meta name="generator" content="makeinfo 4.13"> |
| <link title="Top" rel="start" href="index.html#Top"> |
| <link rel="up" href="Stdio.html#Stdio" title="Stdio"> |
| <link rel="prev" href="viprintf.html#viprintf" title="viprintf"> |
| <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> |
| <meta http-equiv="Content-Style-Type" content="text/css"> |
| <style type="text/css"><!-- |
| pre.display { font-family:inherit } |
| pre.format { font-family:inherit } |
| pre.smalldisplay { font-family:inherit; font-size:smaller } |
| pre.smallformat { font-family:inherit; font-size:smaller } |
| pre.smallexample { font-size:smaller } |
| pre.smalllisp { font-size:smaller } |
| span.sc { font-variant:small-caps } |
| span.roman { font-family:serif; font-weight:normal; } |
| span.sansserif { font-family:sans-serif; font-weight:normal; } |
| --></style> |
| </head> |
| <body> |
| <div class="node"> |
| <a name="viscanf"></a> |
| <p> |
| Previous: <a rel="previous" accesskey="p" href="viprintf.html#viprintf">viprintf</a>, |
| Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a> |
| <hr> |
| </div> |
| |
| <h3 class="section">4.73 <code>viscanf</code>, <code>vfiscanf</code>, <code>vsiscanf</code>—format argument list</h3> |
| |
| <p><a name="index-viscanf-367"></a><a name="index-g_t_005fviscanf_005fr-368"></a><a name="index-vfiscanf-369"></a><a name="index-g_t_005fvfiscanf_005fr-370"></a><a name="index-vsiscanf-371"></a><a name="index-g_t_005fvsiscanf_005fr-372"></a><strong>Synopsis</strong> |
| <pre class="example"> #include <stdio.h> |
| #include <stdarg.h> |
| int viscanf(const char *<var>fmt</var>, va_list <var>list</var>); |
| int vfiscanf(FILE *<var>fp</var>, const char *<var>fmt</var>, va_list <var>list</var>); |
| int vsiscanf(const char *<var>str</var>, const char *<var>fmt</var>, va_list <var>list</var>); |
| |
| int _viscanf_r(struct _reent *<var>reent</var>, const char *<var>fmt</var>, |
| va_list <var>list</var>); |
| int _vfiscanf_r(struct _reent *<var>reent</var>, FILE *<var>fp</var>, const char *<var>fmt</var>, |
| va_list <var>list</var>); |
| int _vsiscanf_r(struct _reent *<var>reent</var>, const char *<var>str</var>, |
| const char *<var>fmt</var>, va_list <var>list</var>); |
| |
| </pre> |
| <p><strong>Description</strong><br> |
| <code>viscanf</code>, <code>vfiscanf</code>, and <code>vsiscanf</code> are (respectively) variants |
| of <code>iscanf</code>, <code>fiscanf</code>, and <code>siscanf</code>. They differ only in |
| allowing their caller to pass the variable argument list as a |
| <code>va_list</code> object (initialized by <code>va_start</code>) rather than |
| directly accepting a variable number of arguments. |
| |
| <p><br> |
| <strong>Returns</strong><br> |
| The return values are consistent with the corresponding functions: |
| <code>viscanf</code> returns the number of input fields successfully scanned, |
| converted, and stored; the return value does not include scanned |
| fields which were not stored. |
| |
| <p>If <code>viscanf</code> attempts to read at end-of-file, the return value |
| is <code>EOF</code>. |
| |
| <p>If no fields were stored, the return value is <code>0</code>. |
| |
| <p>The routines <code>_viscanf_r</code>, <code>_vfiscanf_f</code>, and <code>_vsiscanf_r</code> are |
| reentrant versions which take an additional first parameter which points to the |
| reentrancy structure. |
| |
| <p><br> |
| <strong>Portability</strong><br> |
| These are newlib extensions. |
| |
| <p>Supporting OS subroutines required: |
| |
| <p><br> |
| |
| </body></html> |
| |