1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
|
/*
* Copyright © 2018 Christian Persch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#if !defined(MODE) || !defined(MODE_FIXED)
#error "Must define MODE and MODE_FIXED before including this file"
#endif
/*
* Modes for SM_ECMA/RM_ECMA.
*
* Most of these are not implemented in VTE.
*
* References: ECMA-48 § 7
* WY370
*/
/*
* IRM - insertion replacement mode
*
* Default: reset
*
* References: ECMA-48 § 7.2.10
* VT525
*/
MODE(IRM, 4)
/*
* BDSM - Bi-Directional Support Mode
*
* Reset state is explicit mode, set state is implicit mode
*
* References: ECMA-48
* ECMA TR/53
* Terminal-wg/bidi
*
* Default in ECMA: reset
* Default in Terminal-wg/bidi and VTE: set
*/
MODE(BDSM, 8)
/* Unsupported */
MODE_FIXED(GATM, 1, ALWAYS_RESET)
MODE_FIXED(KAM, 2, ALWAYS_RESET)
MODE_FIXED(CRM, 3, ALWAYS_RESET)
MODE_FIXED(SRTM, 5, ALWAYS_RESET)
MODE_FIXED(ERM, 6, ALWAYS_RESET)
MODE_FIXED(VEM, 7, ALWAYS_RESET)
/* DCSM defaults to RESET in ECMA, forced to SET in Terminal-wg/bidi */
MODE_FIXED(DCSM, 9, ALWAYS_SET)
MODE_FIXED(HEM, 10, ALWAYS_RESET)
MODE_FIXED(PUM, 11, ALWAYS_RESET) /* ECMA-48 § F.4.1 Deprecated */
/*
* SRM - local echo send/receive mode
* If reset, characters entered by the keyboard are shown on the
* screen as well as being sent to the host; if set, the
* keyboard input is only sent to the host.
*
* Default: set
*
* References: ECMA-48 § 7.2.15
* VT525
*
* Removed in VTE 0.60: issue #69
*/
MODE_FIXED(SRM, 12, ALWAYS_SET)
MODE_FIXED(FEAM, 13, ALWAYS_RESET)
MODE_FIXED(FETM, 14, ALWAYS_RESET)
MODE_FIXED(MATM, 15, ALWAYS_RESET)
MODE_FIXED(TTM, 16, ALWAYS_RESET)
MODE_FIXED(SATM, 17, ALWAYS_RESET)
MODE_FIXED(TSM, 18, ALWAYS_RESET)
MODE_FIXED(EBM, 19, ALWAYS_RESET) /* ECMA-48 § F.5.1 Removed */
/*
* LNM - line feed/newline mode
* If set, the cursor moves to the first column on LF, FF, VT,
* and a Return key press sends CRLF.
* If reset, the cursor column is unchanged by LF, FF, VT,
* and a Return key press sends CR only.
*
* Default: reset
*
* References: ECMA-48 § F.5.2 Removed!
* VT525
*/
MODE_FIXED(LNM, 20, ALWAYS_RESET)
MODE_FIXED(GRCM, 21, ALWAYS_SET)
MODE_FIXED(ZDM, 22, ALWAYS_RESET) /* ECMA-48 § F.4.2 Deprecated */
/*
* WYDSCM - display disable mode
* If set, blanks the screen; if reset, shows the data.
*
* Default: reset
*
* References: WY370
*/
MODE_FIXED(WYDSCM, 30, ALWAYS_RESET)
/*
* WHYSTLINM - status line display mode
*
* Default: reset (set-up)
*
* References: WY370
*/
MODE_FIXED(WYSTLINM, 31, ALWAYS_RESET)
/*
* WYCRTSAVM - screen saver mode
* Like DECCRTSM.
*
* Default: reset (set-up)
*
* References: WY370
*/
MODE_FIXED(WYCRTSAVM, 32, ALWAYS_RESET)
/*
* WYSTCURM - steady cursor mode
*
* Default: reset (set-up)
*
* References: WY370
*/
MODE_FIXED(WYSTCURM, 33, ALWAYS_RESET)
/*
* WYULCURM - underline cursor mode
*
* Default: reset (set-up)
*
* References: WY370
*/
MODE_FIXED(WYULCURM, 34, ALWAYS_RESET)
/*
* WYCLRM - width change clear disable mode
* If set, the screen is not cleared when the column mode changes
* by DECCOLM or WY161.
* Note that this does not affect DECSCPP.
* This is the same as DECNCSM mode.
*
* Default: set (set-up)
*
* References: WY370
*/
MODE_FIXED(WYCLRM, 35, ALWAYS_SET)
/*
* WYDELKM - delete key definition
*
* Default: reset (set-up)
*
* References: WY370
*/
MODE_FIXED(WYDELKM, 36, ALWAYS_RESET) /* Same as DECBKM */
/*
* WYGATM - send characters mode
* If set, sends all characters; if reset, only erasable characters.
* Like GATM above.
*
* Default: reset (set-up)
*
* References: WY370
*/
MODE_FIXED(WYGATM, 37, ALWAYS_RESET)
/*
* WYTEXM - send full screen/scrolling region to printer
* Like DECPEX mode.
*
* Default: reset (set-up)
*
* References: WY370
*/
MODE_FIXED(WYTEXM, 38, ALWAYS_RESET)
/*
* WYEXTDM - extra data line
* If set, the last line of the screen is used as data line and not
* a status line; if reset, the last line of the screen is used
* as a status line.
*
* Default: reset
*
* References: WY370
*/
MODE_FIXED(WYEXTDM, 40, ALWAYS_SET)
/*
* WYASCII - WY350 personality mode
* If set, switches to WY350 personality.
*
* Default: reset (set-up)
*
* References: WY370
*/
MODE_FIXED(WYASCII, 42, ALWAYS_SET)
|