curs\_termattrs(3X) Library calls curs\_termattrs(3X)

# [NAME](#NAME)

**baudrate**, **erasechar**, **erasewchar**, **has\_ic**, **has\_il**, **killchar**, **killwchar**, **longname**, **term\_attrs**, **termattrs**, **termname** - get and set terminal attributes with *curses*

# [SYNOPSIS](#SYNOPSIS)

```
#include <curses.h>
```

```
int baudrate(void);
char erasechar(void);
int erasewchar(wchar_t * wc);
bool has_ic(void);
bool has_il(void);
char killchar(void);
int killwchar(wchar_t * wc);
char * longname(void);
attr_t term_attrs(void);
chtype termattrs(void);
char * termname(void);
```

# [DESCRIPTION](#DESCRIPTION)

## [baudrate](#baudrate)

**baudrate** returns the line speed of the terminal, an integer value measured in bits per second, for example **9600**.

## [erasechar, erasewchar](#erasechar,_erasewchar)

**erasechar** returns the terminal's erase character.

**erasewchar** stores the erase character in the location referenced by *wc*. If no erase character has been defined, it fails and the location referenced by *wc* is not changed.

## [has\_ic, has\_il](#has_ic,_has_il)

**has\_ic** returns **TRUE** if the terminal has insert- and delete-character capabilities.

**has\_il** returns **TRUE** if the terminal has insert- and delete-line capabilities, or can simulate them using scrolling regions. It might be used to determine whether it would be appropriate to use [**scrollok**(3X)](/man/os/ncurses/scrollok.3X) to turn on scrolling.

## [killchar, killwchar](#killchar,_killwchar)

**killchar** returns the terminal's line kill character.

**killwchar** stores the line-kill character in the location referenced by *wc*. If no line-kill character has been defined, it fails and the location referenced by *wc* is not changed.

## [longname](#longname)

**longname** returns a pointer to static storage containing a verbose description of the terminal being managed by *curses*. The maximum length of a verbose description is 128 characters. The storage is populated only after [**initscr**(3X)](/man/os/ncurses/initscr.3X) or [**newterm**(3X)](/man/os/ncurses/newterm.3X) is called. This storage is overwritten by each call to **newterm** and not restored by [**set\_term**(3X)](/man/os/ncurses/set_term.3X), so its contents should be saved between calls to **initscr** or **newterm** if **longname** is to be used with multiple terminals.

## [termattrs, term\_attrs](#termattrs,_term_attrs)

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 for it. **termattrs** and **term\_attrs** return a logical “or” of all video attributes supported by the terminal using **A\_** and **WA\_** constants respectively. This information is useful when a *curses* program needs complete control over the appearance of the screen.

## [termname](#termname)

**termname** returns the terminal name used by [**setupterm**(3X)](/man/os/ncurses/setupterm.3X).

# [RETURN VALUE](#RETURN_VALUE)

**longname** and **termname** return *NULL* on error.

Functions that return an integer return **ERR** upon failure and **OK** upon success.

# [NOTES](#NOTES)

**erasewchar**, **killwchar**, and **term\_attrs** are part of *ncurses*'s wide-character API, and are not available in its non-wide-character configuration.

**termattrs** may be implemented as a macro.

# [PORTABILITY](#PORTABILITY)

X/Open Curses Issue 4 describes these functions.

SVr4 describes a successful return value only as “an integer value other than *ERR*”.

Most versions of *curses* truncate the string returned by *termname* to 14 characters.

# [HISTORY](#HISTORY)

4BSD (1980) introduced *longname*.

SVr2 (1984) added *baudrate*, *erasechar*, *killchar*, *has\_ic*, and *has\_il*.

SVr3 (1987) supplied *termname*. Later that year, SVr3.1 brought *termattrs*.

X/Open Curses Issue 4 (1995) specified *erasewchar*, *killwchar*, and *term\_attrs*.

# [SEE ALSO](#SEE_ALSO)

[**curses**(3X)](/man/os/ncurses/curses.3X), [**curs\_initscr**(3X)](/man/os/ncurses/curs_initscr.3X), [**curs\_outopts**(3X)](/man/os/ncurses/curs_outopts.3X)

2025-08-23 ncurses 6.6

---

Document: has_il(3x) from ncurses 6.6.20261031-r0 (Chainguard OS)
Source: https://github.com/ThomasDickey/ncurses-snapshots
