]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_scanw.3x
6ce1c0d2f84d9fad1e3944cae5d1a0b5a60d9aeb
[ncurses.git] / man / curs_scanw.3x
1 .TH curs_scanw 3X ""
2 .SH NAME
3 \fBscanw\fR, \fBwscanw\fR, \fBmvscanw\fR,
4 \fBmvwscanw\fR, \fBvwscanw\fR - convert formatted input from a
5 \fBcurses\fR widow
6 .SH SYNOPSIS
7 \fB#include <curses.h>\fR
8
9 \fBint scanw(char *fmt\fR [\fB, arg\fR] \fB...);\fR
10 .br
11 \fBint wscanw(WINDOW *win, char *fmt\fR [\fB, arg\fR] \fB...);\fR
12 .br
13 \fBint mvscanw(int y, int x, char *fmt\fR [\fB, arg\fR] \fB...);\fR
14 .br
15 \fBint mvwscanw(WINDOW *win, int y, int x,
16       char *fmt\fR [\fB, arg]\fR \fB...);\fR
17 .br
18 \fBint vwscanw(WINDOW *win, char *fmt, va_list varglist);\fR
19 .SH DESCRIPTION
20 The \fBscanw\fR, \fBwscanw\fR and \fBmvscanw\fR routines are analogous to
21 \fBscanf\fR [see \fBscanf\fR(3S)].  The effect of these routines is as though
22 \fBwgetstr\fR were called on the window, and the resulting line used as input
23 for \fBsscanf\fR(3).  Fields which do not map to a variable in the \fIfmt\fR
24 field are lost.
25
26 The \fBvwscanw\fR routine is similar to \fBvwprintw\fR in that it performs a
27 \fBwscanw\fR using a variable argument list.  The third argument is a
28 \fIva\fR_\fIlist\fR, a pointer to a list of arguments, as defined in
29 \fB<varargs.h>\fR.
30 .SH RETURN VALUE
31 \fBvwscanw\fR returns \fBERR\fR on failure and an integer equal to the
32 number of fields scanned on success.
33
34 Applications may use the return value from the \fBscanw\fR, \fBwscanw\fR,
35 \fBmvscanw\fR and \fBmvwscanw\fR routines to determine the number of fields
36 which were mapped in the call.
37 .SH PORTABILITY
38 The XSI Curses standard, Issue 4 describes these functions.  The function
39 \fBvwscanw\fR is marked TO BE WITHDRAWN, and is to be replaced by a function
40 \fBvw_scanw\fR using the \fB<stdarg.h>\fR interface.
41 .SH SEE ALSO
42 \fBcurses\fR(3X), \fBcurs_getstr\fR, \fBcurs_printw\fR, \fBscanf\fR(3S)
43 .\"#
44 .\"# The following sets edit modes for GNU EMACS
45 .\"# Local Variables:
46 .\"# mode:nroff
47 .\"# fill-column:79
48 .\"# End: