curs_termattrs, baudrate, erasechar, erasewchar, has_ic, has_il,
killchar, killwchar, longname, term_attrs, termattrs, termname - Rou‐
tines for querying the Curses environment
void ); char erasechar(
void ); int erasewchar(
wchar_t *ch ); bool has_ic(
void ); bool has_il(
void ); char killchar(
void ); int killwchar(
wchar_t *ch ); char *longname(
void ); attr_t term_attrs(
void ); chtype termattrs(
void ); char *termname(
Curses Library (libcurses)
Interfaces documented on this reference page conform to industry stan‐
dards as follows:
baudrate, erasechar, erasewchar, has_ic, has_il, killchar, killwchar,
longname, term_attrs, termattrs, termname: XCURSES4.2
Refer to the standards(5) reference page for more information about
industry standards and associated tags.
The baudrate routine returns the output speed of the terminal. The num‐
ber returned is an integer that represents bits per second (for exam‐
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; other‐
wise, the routine returns FALSE. Applications might use has_il to find
out if it would be appropriate to call scrollok to turn on physical
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
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.
The termname routine returns the value of the environmental variable
TERM (truncated to 14 characters).
The header file <curses.h> automatically 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 DESCRIPTION sec‐
Functions: curses(3), curs_attr(3), curs_attr_get(3), curs_initscr(3),