Perform a scanf on the window. The scanw function acts on the stdscr window. Format #include <curses.h> int scanw (char *format_spec, . . . ); int wscanw (WINDOW *win, char *format_spec, . . . );
1 – Arguments
win A pointer to the window. format_spec A pointer to the format specification string. . . . Optional expressions that are pointers to objects whose resultant types correspond to conversion specifications given in the format specification. If no conversion specifications are given, you may omit these input pointers. Otherwise, the function call must have at least as many input pointers as there are conversion specifications, and the conversion specifications must match the types of the input pointers. Conversion specifications are matched to input sources in left- to-right order. Excess input pointers, if any, are ignored.
2 – Description
The formatting specification (format_spec) and the other arguments are identical to those used with the scanf function. The scanw and wscanw functions accept, format, and return a line of text from the terminal screen. For more information, see the scrollok and scanf functions.
3 – Return Values
OK Indicates success. ERR Indicates that the function makes the screen scroll illegally or that the scan was unsuccessful.