]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_scanw.3x
ncurses 5.0
[ncurses.git] / man / curs_scanw.3x
1 .\"***************************************************************************
2 .\" Copyright (c) 1998 Free Software Foundation, Inc.                        *
3 .\"                                                                          *
4 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
5 .\" copy of this software and associated documentation files (the            *
6 .\" "Software"), to deal in the Software without restriction, including      *
7 .\" without limitation the rights to use, copy, modify, merge, publish,      *
8 .\" distribute, distribute with modifications, sublicense, and/or sell       *
9 .\" copies of the Software, and to permit persons to whom the Software is    *
10 .\" furnished to do so, subject to the following conditions:                 *
11 .\"                                                                          *
12 .\" The above copyright notice and this permission notice shall be included  *
13 .\" in all copies or substantial portions of the Software.                   *
14 .\"                                                                          *
15 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
16 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
17 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
18 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
19 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
20 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
21 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
22 .\"                                                                          *
23 .\" Except as contained in this notice, the name(s) of the above copyright   *
24 .\" holders shall not be used in advertising or otherwise to promote the     *
25 .\" sale, use or other dealings in this Software without prior written       *
26 .\" authorization.                                                           *
27 .\"***************************************************************************
28 .\"
29 .\" $Id: curs_scanw.3x,v 1.8 1998/12/26 20:10:12 tom Exp $
30 .TH curs_scanw 3X ""
31 .SH NAME
32 \fBscanw\fR, \fBwscanw\fR, \fBmvscanw\fR,
33 \fBmvwscanw\fR, \fBvwscanw\fR - convert formatted input from a
34 \fBcurses\fR widow
35 .SH SYNOPSIS
36 \fB#include <curses.h>\fR
37
38 \fBint scanw(char *fmt\fR [\fB, arg\fR] \fB...);\fR
39 .br
40 \fBint wscanw(WINDOW *win, char *fmt\fR [\fB, arg\fR] \fB...);\fR
41 .br
42 \fBint mvscanw(int y, int x, char *fmt\fR [\fB, arg\fR] \fB...);\fR
43 .br
44 \fBint mvwscanw(WINDOW *win, int y, int x,\fR
45       \fBchar *fmt\fR [\fB, arg]\fR \fB...);\fR
46 .br
47 \fBint vwscanw(WINDOW *win, char *fmt, va_list varglist);\fR
48 .SH DESCRIPTION
49 The \fBscanw\fR, \fBwscanw\fR and \fBmvscanw\fR routines are analogous to
50 \fBscanf\fR [see \fBscanf\fR(3S)].  The effect of these routines is as though
51 \fBwgetstr\fR were called on the window, and the resulting line used as input
52 for \fBsscanf\fR(3).  Fields which do not map to a variable in the \fIfmt\fR
53 field are lost.
54
55 The \fBvwscanw\fR routine is similar to \fBvwprintw\fR in that it performs a
56 \fBwscanw\fR using a variable argument list.  The third argument is a
57 \fIva\fR_\fIlist\fR, a pointer to a list of arguments, as defined in
58 \fB<varargs.h>\fR.
59 .SH RETURN VALUE
60 \fBvwscanw\fR returns \fBERR\fR on failure and an integer equal to the
61 number of fields scanned on success.
62
63 Applications may use the return value from the \fBscanw\fR, \fBwscanw\fR,
64 \fBmvscanw\fR and \fBmvwscanw\fR routines to determine the number of fields
65 which were mapped in the call.
66 .SH PORTABILITY
67 The XSI Curses standard, Issue 4 describes these functions.  The function
68 \fBvwscanw\fR is marked TO BE WITHDRAWN, and is to be replaced by a function
69 \fBvw_scanw\fR using the \fB<stdarg.h>\fR interface.
70 .SH SEE ALSO
71 \fBcurses\fR(3X), \fBcurs_getstr\fR(3X), \fBcurs_printw\fR(3X), \fBscanf\fR(3S)
72 .\"#
73 .\"# The following sets edit modes for GNU EMACS
74 .\"# Local Variables:
75 .\"# mode:nroff
76 .\"# fill-column:79
77 .\"# End: