blob: 6d4cc73d11867bcc2a415fcdf22c17660660383e (
plain)
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
|
class CTTY {
public:
virtual BOOL Input(UINT c) {
VERIFY(SendLiteral(c));
if(
(
Options[toEcho].m_StateU==TOption::stateYes
|| Options[toEcho].m_StateU==TOption::stateNone
) && (
Options[toEcho].m_StateH!=TOption::stateYes
|| Options[toEcho].m_StateH==TOption::stateNone
)
){
PreOutput();
Output(c);
PostOutput();
}
return TRUE;
}
virtual BOOL VInput(WORD vk,DWORD cks) {
return TRUE;
}
virtual BOOL PreOutput() {
return TRUE;
}
virtual BOOL Output(UINT c) {
if(!c)
return TRUE;
static DWORD dummyWritten = 0;
VERIFY(::WriteConsole(hConsoleOutput,&c,1,&dummyWritten,NULL));
return TRUE;
}
virtual BOOL PostOutput() {
return TRUE;
}
virtual BOOL Init() {
return TRUE;
}
virtual LPCTSTR GetTitle() {
if(TTTermType<0)
return "Unknown Terminal Type";
return TTypes[TTTermType].m_Name;
}
}
TT_TTY;
|