]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/curs_scanw.3x.html
ncurses 5.2
[ncurses.git] / doc / html / man / curs_scanw.3x.html
1 <HTML>
2 <BODY>
3 <PRE>
4 <!-- Manpage converted by man2html 3.0.1 -->
5
6 </PRE>
7 <H2>NAME</H2><PRE>
8        <B>scanw</B>, <B>wscanw</B>, <B>mvscanw</B>, <B>mvwscanw</B>, <B>vwscanw</B>, <B>vw_scanw</B> - con-
9        vert formatted input from a <B>curses</B> window
10
11
12 </PRE>
13 <H2>SYNOPSIS</H2><PRE>
14        <B>#include</B> <B>&lt;curses.h&gt;</B>
15
16        <B>int</B> <B>scanw(char</B> <B>*fmt</B> [<B>,</B> <B>arg</B>] <B>...);</B>
17        <B>int</B> <B>wscanw(WINDOW</B> <B>*win,</B> <B>char</B> <B>*fmt</B> [<B>,</B> <B>arg</B>] <B>...);</B>
18        <B>int</B> <B>mvscanw(int</B> <B>y,</B> <B>int</B> <B>x,</B> <B>char</B> <B>*fmt</B> [<B>,</B> <B>arg</B>] <B>...);</B>
19        <B>int</B> <B>mvwscanw(WINDOW</B> <B>*win,</B> <B>int</B> <B>y,</B> <B>int</B> <B>x,</B>
20              <B>char</B> <B>*fmt</B> [<B>,</B> <B>arg]</B> <B>...);</B>
21        <B>int</B> <B>vw_scanw(WINDOW</B> <B>*win,</B> <B>char</B> <B>*fmt,</B> <B>va_list</B> <B>varglist);</B>
22        <B>int</B> <B>vwscanw(WINDOW</B> <B>*win,</B> <B>char</B> <B>*fmt,</B> <B>va_list</B> <B>varglist);</B>
23
24
25 </PRE>
26 <H2>DESCRIPTION</H2><PRE>
27        The <B>scanw</B>, <B>wscanw</B> and <B>mvscanw</B> routines  are  analogous  to
28        <B>scanf</B> [see <B><A HREF="scanf.3S.html">scanf(3S)</A></B>].  The effect of these routines is as
29        though <B>wgetstr</B> were called on the window, and the  result-
30        ing line used as input for <B><A HREF="sscanf.3.html">sscanf(3)</A></B>.  Fields which do not
31        map to a variable in the <I>fmt</I> field are lost.
32
33        The <B>vwscanw</B> routine is similar to <B>vwprintw</B> in that it per-
34        forms  a <B>wscanw</B> using a variable argument list.  The third
35        argument is a <I>va</I>_<I>list</I>, a pointer to a list  of  arguments,
36        as defined in <B>&lt;varargs.h&gt;</B>.
37
38
39 </PRE>
40 <H2>RETURN VALUE</H2><PRE>
41        <B>vwscanw</B> returns <B>ERR</B> on failure and an integer equal to the
42        number of fields scanned on success.
43
44        Applications may use the  return  value  from  the  <B>scanw</B>,
45        <B>wscanw</B>,  <B>mvscanw</B>  and  <B>mvwscanw</B>  routines to determine the
46        number of fields which were mapped in the call.
47
48
49 </PRE>
50 <H2>PORTABILITY</H2><PRE>
51        The XSI Curses standard, Issue  4  describes  these  func-
52        tions.   The  function  <B>vwscanw</B> is marked TO BE WITHDRAWN,
53        and is to be replaced by a  function  <B>vw_scanw</B>  using  the
54        <B>&lt;stdarg.h&gt;</B> interface.
55
56
57 </PRE>
58 <H2>SEE ALSO</H2><PRE>
59        <B><A HREF="ncurses.3x.html">curses(3x)</A></B>, <B><A HREF="curs_getstr.3x.html">curs_getstr(3x)</A></B>, <B><A HREF="curs_printw.3x.html">curs_printw(3x)</A></B>, <B><A HREF="scanf.3S.html">scanf(3S)</A></B>
60
61
62
63
64
65
66
67
68
69
70
71 </PRE>
72 <HR>
73 <ADDRESS>
74 Man(1) output converted with
75 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
76 </ADDRESS>
77 </BODY>
78 </HTML>