curs_termattrs, baudrate, erasechar, erasewchar, has_ic, has_il, killchar, killwchar, longname, term_attrs, termattrs, termname - Routines for querying the Curses environment
Curses Library (libcurses)
Interfaces documented on this reference page conform to industry standards as follows:
baudrate, erasechar, has_ic, has_il, killchar, longname: XPG4, XPG4-UNIX
erasewchar, killwchar, term_attrs, termattrs, termname: XPG4-UNIX
Refer to the
reference page for more information
about industry standards and associated tags.
The baudrate routine returns the output speed of the terminal. The number returned is an integer that represents bits per second (for example, 9600).
The erasechar routine returns the current erase character.
The erasewchar routine stores the current erase character in the object pointed to by ch. If no erase character has been defined, the routine fails and the object pointed to by ch is not changed.
The has_ic routine returns TRUE if the terminal has insert- and delete-character capabilities; otherwise, the routine returns FALSE.
The has_il routine returns TRUE if the terminal has insert- and delete-line capabilities or can simulate them using scrolling regions; otherwise, the routine returns FALSE. Applications might use has_il to find out if it would be appropriate to call scrollok to turn on physical scrolling.
The killchar routine returns the current line-kill character.
The killwchar routine stores the current line-kill character in the object pointed to by ch. If no line-kill character has been defined, the routine fails and the object pointed to by ch is not changed.
The longname routine returns a pointer to a static area containing a verbose description of the current terminal. The maximum length of a verbose description is 128 characters. The static area containing the description is defined only after an application calls initscr or newterm. The area is overwritten by each call to newterm and is not restored by set_term. Therefore, applications should save the area's value only between calls to newterm if longname is used with multiple terminals.
The termattrs and term_attrs routines return the results of a logical OR operation on all video attributes supported by the terminal. The termattrs routine extracts the current terminal's video attributes as defined by the A_ prefix and stored in the chtype data type. The term_attrs routine extracts the current terminal's video attributes as defined by the WA_ prefix and stored in the attr_t data type. These routines are useful when a Curses program needs complete control over the appearance of the screen. If a given terminal does not support a video attribute that an application program is trying to use, Curses may substitute a different video attribute.
routine returns the value of the environmental
(truncated to 14
The header file
includes the header file
Upon successful completion, the erasewchar and killwchar routines return OK; otherwise, they return ERR.
Return values for other routines are discussed in the
Functions: curses(3), curs_attr(3), curs_attr_get(3), curs_initscr(3), curs_outopts(3)