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
|
/* Copyright (c) 1993
* Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
* Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
* Copyright (c) 1987 Oliver Laumann
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program (see the file COPYING); if not, write to the
* Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
****************************************************************
* $Id: ansi.h,v 1.6 1994/05/31 12:31:28 mlschroe Exp $ FAU
*/
#define NATTR 6
#define ATTR_DI 0 /* Dim mode */
#define ATTR_US 1 /* Underscore mode */
#define ATTR_BD 2 /* Bold mode */
#define ATTR_RV 3 /* Reverse mode */
#define ATTR_SO 4 /* Standout mode */
#define ATTR_BL 5 /* Blinking */
#define A_DI (1<<ATTR_DI)
#define A_US (1<<ATTR_US)
#define A_BD (1<<ATTR_BD)
#define A_RV (1<<ATTR_RV)
#define A_SO (1<<ATTR_SO)
#define A_BL (1<<ATTR_BL)
#define A_MAX (1<<(NATTR-1))
#define ATYP_M (1<<0)
#define ATYP_S (1<<1)
#define ATYP_U (1<<2)
/*
* Parser state
*/
enum state_t
{
LIT, /* Literal input */
ESC, /* Start of escape sequence */
ASTR, /* Start of control string */
STRESC, /* ESC seen in control string */
CSI, /* Reading arguments in "CSI Pn ;...*/
PRIN, /* Printer mode */
PRINESC, /* ESC seen in printer mode */
PRINCSI, /* CSI seen in printer mode */
PRIN4 /* CSI 4 seen in printer mode */
};
enum string_t
{
NONE,
DCS, /* Device control string */
OSC, /* Operating system command */
APC, /* Application program command */
/* - used for status change */
PM, /* Privacy message */
AKA, /* title for current screen */
GM, /* Global message to every display */
STATUS /* User hardstatus line */
};
/*
* Types of movement used by GotoPos()
*/
enum move_t {
M_NONE,
M_UP,
M_CUP,
M_DO,
M_CDO,
M_LE,
M_CLE,
M_RI,
M_CRI,
M_RW,
M_CR /* CR and rewrite */
};
#define EXPENSIVE 1000
#define G0 0
#define G1 1
#define G2 2
#define G3 3
#define ASCII 0
#ifdef TOPSTAT
#define STATLINE (0)
#else
#define STATLINE (D_height-1)
#endif
#ifdef KANJI
#undef KANJI
#define KANJI ('B' & 037)
#define KANA 'I'
#define EUC 1
#define SJIS 2
#endif
|