• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/toolchains/hndtools-armeabi-2013.11/share/doc/arm-arm-none-eabi/html/libc/
1<html lang="en">
2<head>
3<title>viscanf - Untitled</title>
4<meta http-equiv="Content-Type" content="text/html">
5<meta name="description" content="Untitled">
6<meta name="generator" content="makeinfo 4.13">
7<link title="Top" rel="start" href="index.html#Top">
8<link rel="up" href="Stdio.html#Stdio" title="Stdio">
9<link rel="prev" href="viprintf.html#viprintf" title="viprintf">
10<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
11<meta http-equiv="Content-Style-Type" content="text/css">
12<style type="text/css"><!--
13  pre.display { font-family:inherit }
14  pre.format  { font-family:inherit }
15  pre.smalldisplay { font-family:inherit; font-size:smaller }
16  pre.smallformat  { font-family:inherit; font-size:smaller }
17  pre.smallexample { font-size:smaller }
18  pre.smalllisp    { font-size:smaller }
19  span.sc    { font-variant:small-caps }
20  span.roman { font-family:serif; font-weight:normal; } 
21  span.sansserif { font-family:sans-serif; font-weight:normal; } 
22--></style>
23<link rel="stylesheet" type="text/css" href="../cs.css">
24</head>
25<body>
26<div class="node">
27<a name="viscanf"></a>
28<p>
29Previous:&nbsp;<a rel="previous" accesskey="p" href="viprintf.html#viprintf">viprintf</a>,
30Up:&nbsp;<a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a>
31<hr>
32</div>
33
34<h3 class="section">4.73 <code>viscanf</code>, <code>vfiscanf</code>, <code>vsiscanf</code>&mdash;format argument list</h3>
35
36<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>
37<pre class="example">     #include &lt;stdio.h&gt;
38     #include &lt;stdarg.h&gt;
39     int viscanf(const char *<var>fmt</var>, va_list <var>list</var>);
40     int vfiscanf(FILE *<var>fp</var>, const char *<var>fmt</var>, va_list <var>list</var>);
41     int vsiscanf(const char *<var>str</var>, const char *<var>fmt</var>, va_list <var>list</var>);
42     
43     int _viscanf_r(struct _reent *<var>reent</var>, const char *<var>fmt</var>,
44         va_list <var>list</var>);
45     int _vfiscanf_r(struct _reent *<var>reent</var>, FILE *<var>fp</var>, const char *<var>fmt</var>,
46         va_list <var>list</var>);
47     int _vsiscanf_r(struct _reent *<var>reent</var>, const char *<var>str</var>,
48         const char *<var>fmt</var>, va_list <var>list</var>);
49     
50</pre>
51   <p><strong>Description</strong><br>
52<code>viscanf</code>, <code>vfiscanf</code>, and <code>vsiscanf</code> are (respectively) variants
53of <code>iscanf</code>, <code>fiscanf</code>, and <code>siscanf</code>.  They differ only in
54allowing their caller to pass the variable argument list as a
55<code>va_list</code> object (initialized by <code>va_start</code>) rather than
56directly accepting a variable number of arguments.
57
58   <p><br>
59<strong>Returns</strong><br>
60The return values are consistent with the corresponding functions:
61<code>viscanf</code> returns the number of input fields successfully scanned,
62converted, and stored; the return value does not include scanned
63fields which were not stored.
64
65   <p>If <code>viscanf</code> attempts to read at end-of-file, the return value
66is <code>EOF</code>.
67
68   <p>If no fields were stored, the return value is <code>0</code>.
69
70   <p>The routines <code>_viscanf_r</code>, <code>_vfiscanf_f</code>, and <code>_vsiscanf_r</code> are
71reentrant versions which take an additional first parameter which points to the
72reentrancy structure.
73
74   <p><br>
75<strong>Portability</strong><br>
76These are newlib extensions.
77
78   <p>Supporting OS subroutines required:
79
80   <p><br>
81
82   </body></html>
83
84