'\"macro stdmacro
.if n .pH g3x.curs_termatt @(#)curs_termatt	40.3 of 12/15/89
.\" Copyright 1989 AT&T
.\" ident	"@(#)svid_ti:ti_lib/curs_termatt	1.3"
.nr X
.if \nX=0 .ds x} curs_termattrs 3X "" "\&"
.if \nX=1 .ds x} curs_termattrs 3X ""
.if \nX=2 .ds x} curs_termattrs 3X "" "\&"
.if \nX=3 .ds x} curs_termattrs "" "" "\&"
.TH \*(x}
.SH NAME
\f4curs_termattrs\f2: \f4 baudrate\f1, \f4erasechar\f1, \f4has_ic\f1, \f4has_il\f1, \f4killchar\f1, \f4longname\f1, \f4termattrs\f1, \f4termname\f1 \- \f4curses\fP environment query routines
.SH SYNOPSIS
.nf
.ft 4
#include <curses.h>
.sp
int baudrate(void);
.sp .5
char erasechar(void);
.sp .5
int has_ic(void);
.sp .5
int has_il(void);
.sp .5
char killchar(void);
.sp .5
char *longname(void);
.sp .5
chtype termattrs(void);
.sp .5
char *termname(void);
.ft 1
.fi
.SH DESCRIPTION
The \f4baudrate\f1 routine returns the output speed of the terminal.
The number returned is in bits per second, for example \f49600\f1,
and is an integer.
.P
With the \f4erasechar\f1 routine, the user's current erase character
is returned.
.P
The \f4has_ic\f1 routine is true if the terminal has insert- and
delete-character capabilities.
.P
The \f4has_il\f1 routine is true if the terminal has insert- and
delete-line capabilities, or can simulate them using scrolling regions.
This might be used to determine if it would be appropriate to turn on
physical scrolling using \f4scrollok\f1.
.P
With the \f4killchar\f1 routine,
the user's current line kill character is returned.
.P
The \f4longname\f1 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.
It is defined only after the call to \f4initscr\f1 or \f4newterm\f1.
The area is overwritten by each call to \f4newterm\f1
and is not restored by \f4set_term\f1,
so the value should be saved between calls to \f4newterm\f1
if \f4longname\f1 is going to be used with multiple terminals.
.P
If a given terminal doesn't support a video attribute that an application
program is trying to use, \f4curses\fP
may substitute a different video attribute
for it.
The \f4termattrs\f1
function returns a logical OR of all video attributes
supported by the terminal.
This information is useful when a
\f4curses\fP program needs
complete control over the appearance of the screen.
.P
The \f4termname\f1 routine
returns the value of the environmental variable \f4TERM\f1 (truncated to
14 characters).
.br
.ne6
.SH RETURN VALUE
\f4longname\fP and \f4termname\fP return \f4NULL\fP on error.
.PP
Routines that return an integer return \f4ERR\f1 upon
failure and an integer value other than \f4ERR\f1
upon successful completion.
.SH NOTES
.P
The header file \f4<curses.h>\f1 automatically includes the header files
\f4<stdio.h>\f1 and \f4<unctrl.h>\f1.
.PP
Note that \f4termattrs\fP may be a macro.
.SH SEE ALSO
.na
\f4curses\fP(3X),
\f4curs_initscr\fP(3X),
\f4curs_outopts\fP(3X).
.ad
