HP 9000 Series 300 Tutorials Manual page 248

Device i/o and user interfacing hp-ux concepts and tutorials
Hide thumbs Also See for HP 9000 Series 300:
Table of Contents

Advertisement

Description of Curses Routines (Continued)
getstr(str)
wgetstr
(win,str)
mvget str
(y, x, str )
mvwgetstr
(win,y,x,str)
2-12
Curses Routines
If keypad is enabled, each function key sequence (usually
an escape sequence) is handled as a single-character
keycode which is assigned a 16-bit integer value in a range
beginning at 0401 (octal) and a name that starts with
KEY_ (a complete list of keypad character value and name
definitions is included in the keypad discussion near the
beginning of this tutorial). The character value is
not
placed in the window for echoing, even if echo is enabled.
If node lay is active: if no input is available in the
keyboard input buffer when getch is called, getch returns
with the value -1 and no other action is taken. If nodelay
is not active, the program hangs until text is available in
the buffer. Depending on the current cbreak setting,
text is made available to the program as each character is
received (c break), or incoming characters are held by the
tty driver until a newline is received then they are made
available to the program (nocbreak).
This routine is used to input an entire line from the
terminal. It is equivalent to getch, except that it handles
an entire string instead of single characters. Handling of
each character is identical to getch except that text and
meta characters are packed into the string variable
str
instead of being returned to the program as individual
16-bit integers. Keypad characters (except for kill, erase,
key _left (left arrow), and backspace) are not recognized
and cannot be handled through getstr.
During execution, getstr generates a series of calls
to getch until a newline is received, at which time it
returns. The 16-bit integers returned by successive calls
to getch are stripped of their unneeded upper bits
(except recognized keypad keys) before packing into a
string variable beginning at the location identified by the
character pointer
str.
If echo is enabled, incoming string characters are also
placed in the associated window (by getch) as they are
received and processed, and echoed to the terminal (by
refresh). If noecho is active, characters are not placed in
the window; they are only placed in
str.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hp 9000 series 800

Table of Contents