more vt100 states

git-svn-id: svn://qnap.local/TwoTerm/trunk@1761 5590a31f-7b70-45f8-8c82-aa3a8e5f4507
This commit is contained in:
Kelvin Sherlock 2010-09-11 20:28:03 +00:00
parent d8ee6e8894
commit 7774937656

View File

@ -24,7 +24,9 @@ enum {
StateDCAX,
StateBracket,
StateBracketQuestion,
StatePound
StatePound,
StateRParen,
StateLParen
};
@ -654,6 +656,14 @@ enum {
return;
}
if (_state == StateRParen || _state == StateLParen)
{
NSLog(@"[%s %s]: unrecognized escape character: `ESC %c %c' (%02x)", object_getClassName(self), sel_getName(_cmd), _state == StateRParen ? ')' : '(', c, (int)c);
_state = StateText;
return;
}
if (_state == StateEsc)
{
switch(c)
@ -661,6 +671,19 @@ enum {
case 0x00:
case 0x07f:
break;
case '(':
_state = StateLParen;
_parms.clear();
_parms.push_back(0);
break;
case ')':
_state = StateLParen;
_parms.clear();
_parms.push_back(0);
break;
case '[':
_state = StateBracket;