BSD 2 development
[unix-history] / src / ex / ex_tty.h
CommitLineData
a3869972
BJ
1/* Copyright (c) 1979 Regents of the University of California */
2/*
3 * Capabilities from termcap
4 *
5 * The description of terminals is a difficult business, and we only
6 * attempt to summarize the capabilities here; for a full description
7 * see the paper describing termcap.
8 *
9 * Capabilities from termcap are of three kinds - string valued options,
10 * numeric valued options, and boolean options. The string valued options
11 * are the most complicated, since they may include padding information,
12 * which we describe now.
13 *
14 * Intelligent terminals often require padding on intelligent operations
15 * at high (and sometimes even low) speed. This is specified by
16 * a number before the string in the capability, and has meaning for the
17 * capabilities which have a P at the front of their comment.
18 * This normally is a number of milliseconds to pad the operation.
19 * In the current system which has no true programmible delays, we
20 * do this by sending a sequence of pad characters (normally nulls, but
21 * specifiable as "pc"). In some cases, the pad is better computed
22 * as some number of milliseconds times the number of affected lines
23 * (to bottom of screen usually, except when terminals have insert modes
24 * which will shift several lines.) This is specified as '12*' e.g.
25 * before the capability to say 12 milliseconds per affected whatever
26 * (currently always line). Capabilities where this makes sense say P*.
27 */
28char tspace[128]; /* Space for capability strings */
29char *aoftspace; /* Address of tspace for relocation */
30
31char *AL; /* P* Add new blank line */
32char *BC; /* Back cursor */
33char *CD; /* P* Clear to end of display */
34char *CE; /* P Clear to end of line */
35char *CL; /* P* Clear screen */
36char *CM; /* P Cursor motion */
37char *DC; /* P* Delete character */
38char *DL; /* P* Delete line sequence */
39char *DM; /* Delete mode (enter) */
40char *DO; /* Down line sequence */
41char *ED; /* End delete mode */
42char *EI; /* End insert mode */
43char *HO; /* Home cursor */
44char *IC; /* P Insert character */
45char *IM; /* Insert mode (give as ':im=:' if 'ic' */
46char *IP; /* P* Insert pad after char ins'd using IM+IE */
47char *LL; /* Quick to last line, column 0 */
48char *MA; /* Control character map for cmd mode */
49char *ND; /* Non-destructive space */
50char PC; /* Pad character */
51char *SE; /* Standout end (may leave space) */
52char *SF; /* P Scroll forwards */
53char *SO; /* Stand out begin (may leave space) */
54char *SR; /* P Scroll backwards */
55char *TA; /* P Tab (other than ^I or with padding) */
56char *UP; /* Upline */
57char *VB; /* Visible bell */
58char *VE; /* Visual end sequence */
59char *VS; /* Visual start sequence */
60bool AM; /* Automatic margins */
61bool BS; /* Backspace works */
62bool CA; /* Cursor addressible */
63bool DA; /* Display may be retained above */
64bool DB; /* Display may be retained below */
65bool EO; /* Can erase overstrikes with ' ' */
66bool GT; /* Gtty indicates tabs */
67bool HZ; /* Hazeltine ~ braindamage */
68bool IN; /* Insert-null blessing */
69bool MI; /* can move in insert mode */
70bool NC; /* No Cr - \r snds \r\n then eats \n (dm2500) */
71bool OS; /* Overstrike works */
72bool UL; /* Underlining works even though !os */
73bool XN; /* A newline gets eaten after wrap (concept) */
74 /* X? is reserved for severely nauseous glitches */
75 /* If there are enough of these we may need bit masks! */
76
77/*
78 * From the tty modes...
79 */
80bool NONL; /* Terminal can't hack linefeeds doing a CR */
81bool UPPERCASE; /* Ick! */
82short LINES; /* Number of lines on screen */
83short COLUMNS;
84short OCOLUMNS; /* Save COLUMNS for a hack in open mode */
85
86short outcol; /* Where the cursor is */
87short outline;
88
89short destcol; /* Where the cursor should be */
90short destline;
91
92struct sgttyb tty; /* Always stty/gtty using this one structure */
93bool normtty; /* Have to restor normal mode from normf */
94int normf; /* Restore tty flags to this (someday) */
95
96short WBOT;
97short WECHO;