1.1.3
by Rodrigo Parra Novo
Import upstream version 216 |
1 |
/* $XTermId: VTparse.h,v 1.42 2006/07/31 22:17:40 tom Exp $ */
|
1.1.2
by Scott James Remnant
Import upstream version 210 |
2 |
|
3 |
/* $XFree86: xc/programs/xterm/VTparse.h,v 3.24 2006/02/13 01:14:58 dickey Exp $ */
|
|
4 |
/*
|
|
5 |
* Copyright 2002-2005,2006 by Thomas E. Dickey
|
|
1
by Stephan Hermann
Import upstream version 203 |
6 |
*
|
7 |
* All Rights Reserved
|
|
8 |
*
|
|
9 |
* Permission to use, copy, modify, and distribute this software and its
|
|
10 |
* documentation for any purpose and without fee is hereby granted,
|
|
11 |
* provided that the above copyright notice appear in all copies and that
|
|
12 |
* both that copyright notice and this permission notice appear in
|
|
13 |
* supporting documentation, and that the name of the above listed
|
|
14 |
* copyright holder(s) not be used in advertising or publicity pertaining
|
|
15 |
* to distribution of the software without specific, written prior
|
|
16 |
* permission.
|
|
17 |
*
|
|
18 |
* THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
|
|
19 |
* TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
20 |
* AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
|
|
21 |
* LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
22 |
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
23 |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
24 |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
25 |
*
|
|
26 |
* Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
|
27 |
*
|
|
28 |
* All Rights Reserved
|
|
29 |
*
|
|
30 |
* Permission to use, copy, modify, and distribute this software and its
|
|
31 |
* documentation for any purpose and without fee is hereby granted,
|
|
32 |
* provided that the above copyright notice appear in all copies and that
|
|
33 |
* both that copyright notice and this permission notice appear in
|
|
34 |
* supporting documentation, and that the name of Digital Equipment
|
|
35 |
* Corporation not be used in advertising or publicity pertaining to
|
|
36 |
* distribution of the software without specific, written prior permission.
|
|
37 |
*
|
|
38 |
*
|
|
39 |
* DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
|
40 |
* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
|
41 |
* DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
|
42 |
* ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
|
43 |
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
|
44 |
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
|
45 |
* SOFTWARE.
|
|
46 |
*/
|
|
47 |
||
48 |
#ifndef included_VTparse_h
|
|
49 |
#define included_VTparse_h 1
|
|
50 |
||
51 |
#include <xterm.h> |
|
52 |
||
53 |
#ifndef Const
|
|
54 |
# if defined(__STDC__) && !defined(__cplusplus)
|
|
55 |
# define Const const
|
|
56 |
# else
|
|
57 |
# define Const /**/ |
|
58 |
# endif
|
|
59 |
#endif
|
|
60 |
||
61 |
/*
|
|
62 |
* PARSE_T has to be large enough to handle the number of cases enumerated here.
|
|
63 |
*/
|
|
64 |
typedef unsigned char PARSE_T; |
|
65 |
||
66 |
extern Const PARSE_T ansi_table[]; |
|
67 |
extern Const PARSE_T cigtable[]; |
|
68 |
extern Const PARSE_T csi2_table[]; |
|
69 |
extern Const PARSE_T csi_ex_table[]; |
|
70 |
extern Const PARSE_T csi_quo_table[]; |
|
71 |
extern Const PARSE_T csi_table[]; |
|
72 |
extern Const PARSE_T dec2_table[]; |
|
73 |
extern Const PARSE_T dec3_table[]; |
|
74 |
extern Const PARSE_T dec_table[]; |
|
75 |
extern Const PARSE_T eigtable[]; |
|
76 |
extern Const PARSE_T esc_sp_table[]; |
|
77 |
extern Const PARSE_T esc_table[]; |
|
78 |
extern Const PARSE_T scrtable[]; |
|
79 |
extern Const PARSE_T scstable[]; |
|
80 |
extern Const PARSE_T sos_table[]; |
|
81 |
||
82 |
#if OPT_DEC_LOCATOR
|
|
83 |
extern Const PARSE_T csi_tick_table[]; |
|
84 |
#endif /* OPT_DEC_LOCATOR */ |
|
85 |
||
86 |
#if OPT_DEC_RECTOPS
|
|
87 |
extern Const PARSE_T csi_dollar_table[]; |
|
88 |
extern Const PARSE_T csi_star_table[]; |
|
89 |
#endif /* OPT_DEC_LOCATOR */ |
|
90 |
||
91 |
#if OPT_VT52_MODE
|
|
92 |
extern Const PARSE_T vt52_table[]; |
|
93 |
extern Const PARSE_T vt52_esc_table[]; |
|
94 |
extern Const PARSE_T vt52_ignore_table[]; |
|
95 |
#endif
|
|
96 |
||
97 |
#if OPT_WIDE_CHARS
|
|
98 |
extern Const PARSE_T esc_pct_table[]; |
|
99 |
#endif
|
|
100 |
||
101 |
/*
|
|
102 |
* The following list of definitions is generated from VTparse.def using the
|
|
103 |
* following command line:
|
|
104 |
*
|
|
105 |
* grep '^CASE_' VTparse.def | awk '{printf "#define %s %d\n", $1, n++}'
|
|
106 |
*
|
|
107 |
* If you need to change something, change VTparse.def and regenerate the
|
|
108 |
* definitions. This would have been automatic, but since this doesn't change
|
|
109 |
* very often, it isn't worth the makefile hassle.
|
|
110 |
*/
|
|
111 |
||
112 |
#define CASE_GROUND_STATE 0
|
|
113 |
#define CASE_IGNORE 1
|
|
114 |
#define CASE_BELL 2
|
|
115 |
#define CASE_BS 3
|
|
116 |
#define CASE_CR 4
|
|
117 |
#define CASE_ESC 5
|
|
118 |
#define CASE_VMOT 6
|
|
119 |
#define CASE_TAB 7
|
|
120 |
#define CASE_SI 8
|
|
121 |
#define CASE_SO 9
|
|
122 |
#define CASE_SCR_STATE 10
|
|
123 |
#define CASE_SCS0_STATE 11
|
|
124 |
#define CASE_SCS1_STATE 12
|
|
125 |
#define CASE_SCS2_STATE 13
|
|
126 |
#define CASE_SCS3_STATE 14
|
|
127 |
#define CASE_ESC_IGNORE 15
|
|
128 |
#define CASE_ESC_DIGIT 16
|
|
129 |
#define CASE_ESC_SEMI 17
|
|
130 |
#define CASE_DEC_STATE 18
|
|
131 |
#define CASE_ICH 19
|
|
132 |
#define CASE_CUU 20
|
|
133 |
#define CASE_CUD 21
|
|
134 |
#define CASE_CUF 22
|
|
135 |
#define CASE_CUB 23
|
|
136 |
#define CASE_CUP 24
|
|
137 |
#define CASE_ED 25
|
|
138 |
#define CASE_EL 26
|
|
139 |
#define CASE_IL 27
|
|
140 |
#define CASE_DL 28
|
|
141 |
#define CASE_DCH 29
|
|
142 |
#define CASE_DA1 30
|
|
143 |
#define CASE_TRACK_MOUSE 31
|
|
144 |
#define CASE_TBC 32
|
|
145 |
#define CASE_SET 33
|
|
146 |
#define CASE_RST 34
|
|
147 |
#define CASE_SGR 35
|
|
148 |
#define CASE_CPR 36
|
|
149 |
#define CASE_DECSTBM 37
|
|
150 |
#define CASE_DECREQTPARM 38
|
|
151 |
#define CASE_DECSET 39
|
|
152 |
#define CASE_DECRST 40
|
|
153 |
#define CASE_DECALN 41
|
|
154 |
#define CASE_GSETS 42
|
|
155 |
#define CASE_DECSC 43
|
|
156 |
#define CASE_DECRC 44
|
|
157 |
#define CASE_DECKPAM 45
|
|
158 |
#define CASE_DECKPNM 46
|
|
159 |
#define CASE_IND 47
|
|
160 |
#define CASE_NEL 48
|
|
161 |
#define CASE_HTS 49
|
|
162 |
#define CASE_RI 50
|
|
163 |
#define CASE_SS2 51
|
|
164 |
#define CASE_SS3 52
|
|
165 |
#define CASE_CSI_STATE 53
|
|
166 |
#define CASE_OSC 54
|
|
167 |
#define CASE_RIS 55
|
|
168 |
#define CASE_LS2 56
|
|
169 |
#define CASE_LS3 57
|
|
170 |
#define CASE_LS3R 58
|
|
171 |
#define CASE_LS2R 59
|
|
172 |
#define CASE_LS1R 60
|
|
173 |
#define CASE_PRINT 61
|
|
174 |
#define CASE_XTERM_SAVE 62
|
|
175 |
#define CASE_XTERM_RESTORE 63
|
|
176 |
#define CASE_XTERM_TITLE 64
|
|
177 |
#define CASE_DECID 65
|
|
178 |
#define CASE_HP_MEM_LOCK 66
|
|
179 |
#define CASE_HP_MEM_UNLOCK 67
|
|
180 |
#define CASE_HP_BUGGY_LL 68
|
|
181 |
#define CASE_HPA 69
|
|
182 |
#define CASE_VPA 70
|
|
183 |
#define CASE_XTERM_WINOPS 71
|
|
184 |
#define CASE_ECH 72
|
|
185 |
#define CASE_CHT 73
|
|
186 |
#define CASE_CPL 74
|
|
187 |
#define CASE_CNL 75
|
|
188 |
#define CASE_CBT 76
|
|
189 |
#define CASE_SU 77
|
|
190 |
#define CASE_SD 78
|
|
191 |
#define CASE_S7C1T 79
|
|
192 |
#define CASE_S8C1T 80
|
|
193 |
#define CASE_ESC_SP_STATE 81
|
|
194 |
#define CASE_ENQ 82
|
|
195 |
#define CASE_DECSCL 83
|
|
196 |
#define CASE_DECSCA 84
|
|
197 |
#define CASE_DECSED 85
|
|
198 |
#define CASE_DECSEL 86
|
|
199 |
#define CASE_DCS 87
|
|
200 |
#define CASE_PM 88
|
|
201 |
#define CASE_SOS 89
|
|
202 |
#define CASE_ST 90
|
|
203 |
#define CASE_APC 91
|
|
204 |
#define CASE_EPA 92
|
|
205 |
#define CASE_SPA 93
|
|
206 |
#define CASE_CSI_QUOTE_STATE 94
|
|
207 |
#define CASE_DSR 95
|
|
208 |
#define CASE_ANSI_LEVEL_1 96
|
|
209 |
#define CASE_ANSI_LEVEL_2 97
|
|
210 |
#define CASE_ANSI_LEVEL_3 98
|
|
211 |
#define CASE_MC 99
|
|
212 |
#define CASE_DEC2_STATE 100
|
|
213 |
#define CASE_DA2 101
|
|
214 |
#define CASE_DEC3_STATE 102
|
|
215 |
#define CASE_DECRPTUI 103
|
|
216 |
#define CASE_VT52_CUP 104
|
|
217 |
#define CASE_REP 105
|
|
218 |
#define CASE_CSI_EX_STATE 106
|
|
219 |
#define CASE_DECSTR 107
|
|
220 |
#define CASE_DECDHL 108
|
|
221 |
#define CASE_DECSWL 109
|
|
222 |
#define CASE_DECDWL 110
|
|
223 |
#define CASE_DEC_MC 111
|
|
224 |
#define CASE_ESC_PERCENT 112
|
|
225 |
#define CASE_UTF8 113
|
|
226 |
#define CASE_CSI_TICK_STATE 114
|
|
227 |
#define CASE_DECELR 115
|
|
228 |
#define CASE_DECRQLP 116
|
|
229 |
#define CASE_DECEFR 117
|
|
230 |
#define CASE_DECSLE 118
|
|
231 |
#define CASE_CSI_IGNORE 119
|
|
232 |
#define CASE_VT52_IGNORE 120
|
|
233 |
#define CASE_VT52_FINISH 121
|
|
234 |
#define CASE_CSI_DOLLAR_STATE 122
|
|
235 |
#define CASE_DECCRA 123
|
|
236 |
#define CASE_DECERA 124
|
|
237 |
#define CASE_DECFRA 125
|
|
238 |
#define CASE_DECSERA 126
|
|
239 |
#define CASE_DECSACE 127
|
|
240 |
#define CASE_DECCARA 128
|
|
241 |
#define CASE_DECRARA 129
|
|
242 |
#define CASE_CSI_STAR_STATE 130
|
|
1.1.3
by Rodrigo Parra Novo
Import upstream version 216 |
243 |
#define CASE_SET_MOD_FKEYS 131
|
244 |
#define CASE_SET_MOD_FKEYS0 132
|
|
1
by Stephan Hermann
Import upstream version 203 |
245 |
|
246 |
#endif /* included_VTparse_h */ |