1curs_scanw(3CURSES) Curses Library Functions curs_scanw(3CURSES)
2
3
4
6 curs_scanw, scanw, wscanw, mvscanw, mvwscanw, vwscanw - convert format‐
7 ted input from a curses widow
8
10 cc [ flag ... ] file ... -lcurses [ library ... ]
11 #include <curses.h>
12
13 int scanw(char *fmt, /* arg */ ...);
14
15
16 int wscanw(WINDOW *win, char *fmt, /* arg */ ...);
17
18
19 int mvscanw(int y, int x, char *fmt, /* arg */ ...);
20
21
22 int mvwscanw(WINDOW *win, int y, int x, char *fmt, /* arg */...);
23
24
25 int vwscanw(WINDOW *win, char *fmt, va_list varglist);
26
27
29 The scanw(), wscanw(), and mvscanw() routines correspond to scanf()
30 (see scanf(3C)). The effect of these routines is as though wgetstr()
31 were called on the window, and the resulting line used as input for the
32 scan. Fields which do not map to a variable in the fmt field are lost.
33
34
35 The vwscanw() routine is similar to vwprintw() in that it performs a
36 wscanw() using a variable argument list. The third argument is a
37 va_list, a pointer to a list of arguments, as defined in <varargs.h>.
38
40 vwscanw() returns ERR on failure and an integer equal to the number of
41 fields scanned on success.
42
43
44 Applications may interrogate the return value from the scanw, wscanw(),
45 mvscanw(), and mvwscanw() routines to determine the number of fields
46 which were mapped in the call.
47
49 See attributes(5) for descriptions of the following attributes:
50
51
52
53
54 ┌─────────────────────────────┬─────────────────────────────┐
55 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
56 ├─────────────────────────────┼─────────────────────────────┤
57 │MT-Level │Unsafe │
58 └─────────────────────────────┴─────────────────────────────┘
59
61 curs_getstr(3CURSES), curs_printw(3CURSES), curses(3CURSES), scanf(3C),
62 attributes(5)
63
65 The header <curses.h> automatically includes the headers <stdio.h> and
66 <unctrl.h>.
67
68
69
70SunOS 5.11 31 Dec 1996 curs_scanw(3CURSES)