Curses Library Functions curstermattrs(3CURSES)
NAME
curstermattrs, baudrate, erasechar, hasic, hasil,
killchar, longname, termattrs, termname - curses environment
query routines
SYNOPSIS
cc [ flag ... ] file ... -lcurses [ library ... ]
#include
int baudrate(void);
char erasechar(void);
int hasic(void);
int hasil(void);
char killchar(void);
char *longname(void);
chtype termattrs(void);
char *termname(void);
DESCRIPTION
The baudrate() routine returns the output speed of the ter-
minal. The number returned is in bits per second, for exam-
ple 9600, and is an integer.
With the erasechar() routine, the user's current erase char-
acter is returned.
The hasic() routine is true if the terminal has insert- and
delete-character capabilities.
The hasil() routine is true if the terminal has insert- and
delete-line capabilities, or can simulate them using scrol-
ling regions. This might be used to determine if it would be
appropriate to turn on physical scrolling using scrollok().
SunOS 5.11 Last change: 31 Dec 1996 1
Curses Library Functions curstermattrs(3CURSES)
With the killchar() routine, the user's current line kill
character is returned.
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 charac-
ters. It is defined only after the call to initscr() or
newterm(). The area is overwritten by each call to newterm()
and is not restored by setterm(), so the value should be
saved between calls to newterm() if longname() is going to
be used with multiple terminals.
If a given terminal doesn't support a video attribute that
an application program is trying to use, curses may substi-
tute a different video attribute for it. The termattrs()
function returns a logical OR of all video attributes sup-
ported by the terminal. This information is useful when a
curses program needs complete control over the appearance of
the screen.
The termname() routine returns the value of the environment
variable TERM (truncated to 14 characters).
RETURN VALUES
longname() and termname() return NUL on error.
Routines that return an integer return ER upon failure and
an integer value other than ER upon successful completion.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
MT-Level Unsafe
SEE ALSO
cursinitscr(3CURSES), cursoutopts(3CURSES),
curses(3CURSES), attributes(5)
NOTES
SunOS 5.11 Last change: 31 Dec 1996 2
Curses Library Functions curstermattrs(3CURSES)
The header automatically includes the headers
and .
Note that termattrs() may be a macro.
SunOS 5.11 Last change: 31 Dec 1996 3
|