| 134 |
BYTE PrevCharacter; |
BYTE PrevCharacter; |
| 135 |
BOOL PrevCRorLFGeneratedCRLF; // indicates that previous CR or LF really generated a CR+LF |
BOOL PrevCRorLFGeneratedCRLF; // indicates that previous CR or LF really generated a CR+LF |
| 136 |
|
|
| 137 |
|
BYTE LastPutCharacter; |
| 138 |
|
|
| 139 |
// status buffer for main screen & status line |
// status buffer for main screen & status line |
| 140 |
static TStatusBuff SBuff1, SBuff2, SBuff3; |
static TStatusBuff SBuff1, SBuff2, SBuff3; |
| 141 |
|
|
| 343 |
PrevCharacter = -1; // none |
PrevCharacter = -1; // none |
| 344 |
PrevCRorLFGeneratedCRLF = FALSE; |
PrevCRorLFGeneratedCRLF = FALSE; |
| 345 |
|
|
| 346 |
|
LastPutCharacter = 0; |
| 347 |
|
|
| 348 |
// Beep over-used |
// Beep over-used |
| 349 |
BeepStartTime = GetTickCount(); |
BeepStartTime = GetTickCount(); |
| 350 |
BeepSuppressTime = BeepStartTime - ts.BeepSuppressTime * 1000; |
BeepSuppressTime = BeepStartTime - ts.BeepSuppressTime * 1000; |
| 614 |
if (cv.HLogBuf!=0) Log1Byte(HT); |
if (cv.HLogBuf!=0) Log1Byte(HT); |
| 615 |
} |
} |
| 616 |
|
|
| 617 |
|
void RepeatChar(BYTE b, int count) |
| 618 |
|
{ |
| 619 |
|
int i; |
| 620 |
|
BOOL SpecialNew; |
| 621 |
|
TCharAttr CharAttrTmp, CharAttrWrap; |
| 622 |
|
|
| 623 |
|
if (b <= US || b == DEL) |
| 624 |
|
return; |
| 625 |
|
|
| 626 |
|
CharAttrTmp = CharAttr; |
| 627 |
|
LastPutCharacter = 0; |
| 628 |
|
|
| 629 |
|
SpecialNew = FALSE; |
| 630 |
|
if ((b>0x5F) && (b<0x80)) { |
| 631 |
|
if (SSflag) |
| 632 |
|
SpecialNew = (Gn[GLtmp]==IdSpecial); |
| 633 |
|
else |
| 634 |
|
SpecialNew = (Gn[Glr[0]]==IdSpecial); |
| 635 |
|
} |
| 636 |
|
else if (b>0xDF) { |
| 637 |
|
if (SSflag) |
| 638 |
|
SpecialNew = (Gn[GLtmp]==IdSpecial); |
| 639 |
|
else |
| 640 |
|
SpecialNew = (Gn[Glr[1]]==IdSpecial); |
| 641 |
|
} |
| 642 |
|
|
| 643 |
|
if (SpecialNew != Special) { |
| 644 |
|
UpdateStr(); |
| 645 |
|
Special = SpecialNew; |
| 646 |
|
} |
| 647 |
|
|
| 648 |
|
if (Special) { |
| 649 |
|
b = b & 0x7F; |
| 650 |
|
CharAttrTmp.Attr |= AttrSpecial; |
| 651 |
|
} |
| 652 |
|
else |
| 653 |
|
CharAttrTmp.Attr |= CharAttr.Attr; |
| 654 |
|
|
| 655 |
|
CharAttrWrap = CharAttrTmp; |
| 656 |
|
CharAttrWrap.Attr |= ts.EnableContinuedLineCopy ? AttrLineContinued : 0; |
| 657 |
|
|
| 658 |
|
for (i=0; i<count; i++) { |
| 659 |
|
if (Wrap) { |
| 660 |
|
CarriageReturn(FALSE); |
| 661 |
|
LineFeed(LF,FALSE); |
| 662 |
|
} |
| 663 |
|
|
| 664 |
|
BuffPutChar(b, Wrap ? CharAttrWrap : CharAttrTmp, InsertMode); |
| 665 |
|
|
| 666 |
|
if (CursorX == CursorRightM || CursorX >= NumOfColumns-1) { |
| 667 |
|
UpdateStr(); |
| 668 |
|
Wrap = AutoWrapMode; |
| 669 |
|
} |
| 670 |
|
else { |
| 671 |
|
Wrap = FALSE; |
| 672 |
|
MoveRight(); |
| 673 |
|
} |
| 674 |
|
} |
| 675 |
|
} |
| 676 |
|
|
| 677 |
void PutChar(BYTE b) |
void PutChar(BYTE b) |
| 678 |
{ |
{ |
| 679 |
BOOL SpecialNew; |
BOOL SpecialNew; |
| 681 |
|
|
| 682 |
CharAttrTmp = CharAttr; |
CharAttrTmp = CharAttr; |
| 683 |
|
|
| 684 |
|
LastPutCharacter = b; |
| 685 |
|
|
| 686 |
if (PrinterMode) { // printer mode |
if (PrinterMode) { // printer mode |
| 687 |
WriteToPrnFile(b,TRUE); |
WriteToPrnFile(b,TRUE); |
| 688 |
return; |
return; |
| 1844 |
BuffEraseChars(Param[1]); |
BuffEraseChars(Param[1]); |
| 1845 |
} |
} |
| 1846 |
|
|
| 1847 |
|
void CSRepeatCharacter() |
| 1848 |
|
{ |
| 1849 |
|
CheckParamVal(Param[1], NumOfColumns * NumOfLines); |
| 1850 |
|
|
| 1851 |
|
BuffUpdateScroll(); |
| 1852 |
|
RepeatChar(LastPutCharacter, Param[1]); |
| 1853 |
|
} |
| 1854 |
|
|
| 1855 |
void CSScrollUp() |
void CSScrollUp() |
| 1856 |
{ |
{ |
| 1857 |
// TODO: スクロールの最大値を端末行数に制限すべきか要検討 |
// TODO: スクロールの最大値を端末行数に制限すべきか要検討 |
| 4012 |
// case '^': break; // SIMD -- Not support |
// case '^': break; // SIMD -- Not support |
| 4013 |
case '`': CSMoveToColumnN(); break; // HPA |
case '`': CSMoveToColumnN(); break; // HPA |
| 4014 |
case 'a': CSCursorRight(FALSE); break; // HPR |
case 'a': CSCursorRight(FALSE); break; // HPR |
| 4015 |
// case 'b': break; // REP -- Not support |
case 'b': CSRepeatCharacter(); break; // REP |
| 4016 |
case 'c': AnswerTerminalType(); break; // DA |
case 'c': AnswerTerminalType(); break; // DA |
| 4017 |
case 'd': CSMoveToLineN(); break; // VPA |
case 'd': CSMoveToLineN(); break; // VPA |
| 4018 |
case 'e': CSCursorDown(FALSE); break; // VPR |
case 'e': CSCursorDown(FALSE); break; // VPR |
| 5888 |
|
|
| 5889 |
PrevCharacter = b; // memorize previous character for AUTO CR/LF-receive mode |
PrevCharacter = b; // memorize previous character for AUTO CR/LF-receive mode |
| 5890 |
|
|
| 5891 |
|
if (LastPutCharacter != b && !(ParseMode == ModeESC || ParseMode == ModeCSI)) { |
| 5892 |
|
LastPutCharacter = 0; |
| 5893 |
|
} |
| 5894 |
|
|
| 5895 |
if (ChangeEmu==0) |
if (ChangeEmu==0) |
| 5896 |
c = CommRead1Byte(&cv,&b); |
c = CommRead1Byte(&cv,&b); |
| 5897 |
} |
} |