forked from topjoo/dnw
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProcessEscSeq.h
More file actions
53 lines (33 loc) · 861 Bytes
/
ProcessEscSeq.h
File metadata and controls
53 lines (33 loc) · 861 Bytes
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
// vt100 Escape Seqence /////////////////////////////
#ifndef _PROCESSESCSEQ_H_
#define _PROCESSESCSEQ_H_
#define ESC 27
//#define isNumChar(ch) {(((unsigned char) ch) >= '0' && ((unsigned char) ch) <= '9') ? 1 : 0}
class ProcessEscSeq {
public :
ProcessEscSeq();
public :
// define active ESC process state...
#define STESC_NULL 0
#define STESC_ON 1
int m_stEscSeq;
int IsEscOn();
int EscOn();
int EscOff();
int ProcessEscCode(char ch);
private:
#define CPST_WAIT 0
#define CPST_START 1
#define CPST_PMSTART 2 // esc [ process
int m_stCodeProcess;
int m_escFunCode;
#define SZPNUM_LENGATH 100
#define SZPNUM_PCNT 10
int m_numParam;
char m_nParamStr[SZPNUM_PCNT][SZPNUM_LENGATH];
int m_nParam[SZPNUM_PCNT];
char *m_pstrNumParam;
int GetNumParamLength();
int GetNumParam(int pnum);
};
#endif