xref: /haiku/src/apps/terminal/VTparse.h (revision 96490327ca254c5b2e989fb3fc20c4d36c2c6f93)
1 /*
2  * Copyright (c) 2003-4 Kian Duffy <myob@users.sourceforge.net>
3  * Parts Copyright (C) 1998,99 Kazuho Okui and Takashi Murai.
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining
6  * a copy of this software and associated documentation files or portions
7  * thereof (the "Software"), to deal in the Software without restriction,
8  * including without limitation the rights to use, copy, modify, merge,
9  * publish, distribute, sublicense, and/or sell copies of the Software,
10  * and to permit persons to whom the Software is furnished to do so, subject
11  * to the following conditions:
12  *
13  *  * Redistributions of source code must retain the above copyright notice,
14  *    this list of conditions and the following disclaimer.
15  *
16  *  * Redistributions in binary form must reproduce the above copyright notice
17  *    in the  binary, as well as this list of conditions and the following
18  *    disclaimer in the documentation and/or other materials provided with
19  *    the distribution.
20  *
21  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27  * THE SOFTWARE.
28  *
29  */
30 
31 
32 #define CASE_GROUND_STATE 0
33 #define CASE_IGNORE_STATE 1
34 #define CASE_IGNORE_ESC 2
35 #define CASE_IGNORE 3
36 #define CASE_BELL 4
37 #define CASE_BS 5
38 #define CASE_CR 6
39 #define CASE_ESC 7
40 #define CASE_VMOT 8
41 #define CASE_TAB 9
42 #define CASE_LF 10
43 #define CASE_SI 11
44 #define CASE_SO 12
45 #define CASE_SP 13
46 #define CASE_SCR_STATE 14
47 #define CASE_SCS0_STATE 15
48 #define CASE_SCS1_STATE 16
49 #define CASE_SCS2_STATE 17
50 #define CASE_SCS3_STATE 18
51 #define CASE_ESC_IGNORE 19
52 #define CASE_ESC_DIGIT 20
53 #define CASE_ESC_SEMI 21
54 #define CASE_DEC_STATE 22
55 #define CASE_ICH 23
56 #define CASE_CUU 24
57 #define CASE_CUD 25
58 #define CASE_CUF 26
59 #define CASE_CUB 27
60 #define CASE_CUP 28
61 #define CASE_ED 29
62 #define CASE_EL 30
63 #define CASE_IL 31
64 #define CASE_DL 32
65 #define CASE_DCH 33
66 #define CASE_DA1 34
67 #define CASE_TRACK_MOUSE 35
68 #define CASE_TBC 36
69 #define CASE_SET 37
70 #define CASE_RST 38
71 #define CASE_SGR 39
72 #define CASE_CPR 40
73 #define CASE_DECSTBM 41
74 #define CASE_DECREQTPARM 42
75 #define CASE_DECSET 43
76 #define CASE_DECRST 44
77 #define CASE_DECALN 45
78 #define CASE_GSETS 46
79 #define CASE_DECSC 47
80 #define CASE_DECRC 48
81 #define CASE_DECKPAM 49
82 #define CASE_DECKPNM 50
83 #define CASE_IND 51
84 #define CASE_NEL 52
85 #define CASE_HTS 53
86 #define CASE_RI 54
87 #define CASE_SS2 55
88 #define CASE_SS3 56
89 #define CASE_CSI_STATE 57
90 #define CASE_OSC 58
91 #define CASE_RIS 59
92 #define CASE_LS2 60
93 #define CASE_LS3 61
94 #define CASE_LS3R 62
95 #define CASE_LS2R 63
96 #define CASE_LS1R 64
97 #define CASE_PRINT 65
98 #define CASE_XTERM_SAVE 66
99 #define CASE_XTERM_RESTORE 67
100 #define CASE_XTERM_TITLE 68
101 #define CASE_DECID 69
102 #define CASE_HP_MEM_LOCK 70
103 #define CASE_HP_MEM_UNLOCK 71
104 #define CASE_HP_BUGGY_LL 72
105 #define CASE_TO_STATUS 73
106 #define CASE_FROM_STATUS 74
107 #define CASE_SHOW_STATUS 75
108 #define CASE_HIDE_STATUS 76
109 #define CASE_ERASE_STATUS 77
110 #define CASE_MBCS 78
111 #define CASE_SCS_STATE 79
112 #define CASE_UTF8_2BYTE 80
113 #define CASE_UTF8_3BYTE 81
114 #define CASE_UTF8_INSTRING 82
115 #define CASE_SJIS_INSTRING 83
116 #define CASE_SJIS_KANA 84
117 #define CASE_PRINT_GR 85
118 #define CASE_PRINT_CS96 86
119 // additions, maybe reorder/reuse older ones ?
120 #define CASE_VPA 87
121 #define CASE_HPA 88
122 
123 #define CASE_SU		89	/* scroll screen up */
124 #define CASE_SD		90	/* scroll screen down */
125 #define CASE_ECH 	91	/* erase characters */
126