HPlogo MPE/iX Developer's Kit Reference Manual Volume 2: HP 3000 MPE/iX Computer Systems > Chapter 4 CURSES

scanw wscanw mvscanw mvwscanw vwscanw

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

The scanw set of routines is used to perform a formatted read from a window.

Syntax

   #include <curses.h>



   int scanw(char *fmt [,arg...]);

   int wscanw(WINDOW *win, char *fmt [,arg...]);



   int mvscanw(int y, int x, char *fmt[,arg...]);

   int mvwscanw(WINDOW *win, int y, int x, char *fmt[,arg...])



   #include <stdargs.h>



   vwscanw(WINDOW *win, char *fmt, va_list arglist);

Parameters

fmt [,arg...]

A vwscanw() format string, where arg is zero or more arguments used to satisfy the scanf() string.

fmt, arglist

A vscan() format string, where arglist is a pointer to zero or more arguments used to satisfy the scanf() string.

win

A pointer to the window in which the character is to be read.

x

The x (column) coordinate of the position of the character to be read.

y

The y (row) coordinate of the position of the character to be read.

Return Values

OK

Successful completion.

ERR

An error occurred.

Description

These routines are functionally equivalent to scanf(). Characters are read from the window using wgetstr(). When a newline is received, the line is processed by scanw(), which places the result in the appropriate args.

With scanw() and wscanw(), the characters are read from stdscr and win, respectively. The mvscanw() and mvwscanw() routines position the cursor in the window and then call scanw(). The vwscanw() routine reads from the window using the stdargs variable list.

Implementation Considerations

The scanw(), wscanw(), mvscanw(), and mvwscanw() routines are identical to XPG/3. The vwscanw() routine is a UNIX System V implementation.

See Also

wgetstr()

Portability

The scanw(), wscanw(), mvscanw(), and mvwscanw() routines conform to HP-UX, UNIX System V and XPG/3. The vwscanw() routine conforms to UNIX System V.

Feedback to webmaster