1curs_termattrs(3X)                                          curs_termattrs(3X)
2
3
4

NAME

6       baudrate,  erasechar,  erasewchar, has_ic, has_il, killchar, killwchar,
7       longname, term_attrs, termattrs, termname -  curses  environment  query
8       routines
9

SYNOPSIS

11       #include <curses.h>
12
13       int baudrate(void);
14       char erasechar(void);
15       int erasewchar(wchar_t *ch);
16       bool has_ic(void);
17       bool has_il(void);
18       char killchar(void);
19       int killwchar(wchar_t *ch);
20       char *longname(void);
21       attr_t term_attrs(void);
22       chtype termattrs(void);
23       char *termname(void);
24

DESCRIPTION

26       The  baudrate  routine  returns  the output speed of the terminal.  The
27       number returned is in bits per second, for  example  9600,  and  is  an
28       integer.
29
30       The erasechar routine returns the user's current erase character.
31
32       The  erasewchar routine stores the current erase character in the loca‐
33       tion referenced by ch.  If no erase character  has  been  defined,  the
34       routine fails and the location referenced by ch is not changed.
35
36       The  has_ic  routine  is  true  if the terminal has insert- and delete-
37       character capabilities.
38
39       The has_il routine is true if the terminal has insert- and  delete-line
40       capabilities, or can simulate them using scrolling regions.  This might
41       be used to determine if it would be appropriate  to  turn  on  physical
42       scrolling using scrollok.
43
44       The killchar routine returns the user's current line kill character.
45
46       The  killwchar  routine  stores  the current line-kill character in the
47       location referenced by ch.  If no line-kill character has been defined,
48       the routine fails and the location referenced by ch is not changed.
49
50       The  longname  routine  returns a pointer to a static area containing a
51       verbose description of the current terminal.  The maximum length  of  a
52       verbose  description  is  128 characters.  It is defined only after the
53       call to initscr or newterm.  The area is overwritten by  each  call  to
54       newterm  and  is not restored by set_term, so the value should be saved
55       between calls to newterm if longname is going to be used with  multiple
56       terminals.
57
58       If a given terminal does not support a video attribute that an applica‐
59       tion program is trying to use, curses may substitute a different  video
60       attribute for it.  The termattrs and term_attrs functions return a log‐
61       ical OR of all video attributes supported by the terminal using A_  and
62       WA_  constants  respectively.  This information is useful when a curses
63       program needs complete control over the appearance of the screen.
64
65       The termname routine returns the terminal name used by setupterm.
66

RETURN VALUE

68       longname and termname return NULL on error.
69
70       Routines that return an integer return ERR upon failure  and  OK  (SVr4
71       only  specifies "an integer value other than ERR") upon successful com‐
72       pletion.
73

NOTES

75       Note that termattrs may be a macro.
76

PORTABILITY

78       The XSI Curses standard, Issue 4 describes these functions.  It changes
79       the  return type of termattrs to the new type attr_t.  Most versions of
80       curses truncate the result returned by termname to 14 characters.
81

SEE ALSO

83       curses(3X), curs_initscr(3X), curs_outopts(3X)
84
85
86
87                                                            curs_termattrs(3X)
Impressum