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

RETURN VALUE

75       longname and termname return NULL on error.
76
77       Routines that return an integer return ERR upon failure  and  OK  (SVr4
78       only  specifies "an integer value other than ERR") upon successful com‐
79       pletion.
80

NOTES

82       Note that termattrs may be a macro.
83

PORTABILITY

85       The XSI Curses standard, Issue 4 describes these functions.  It changes
86       the  return type of termattrs to the new type attr_t.  Most versions of
87       curses truncate the result returned by termname to 14 characters.
88

SEE ALSO

90       curses(3X), curs_initscr(3X), curs_outopts(3X)
91
92
93
94                                                            curs_termattrs(3X)
Impressum