Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/teraterm/teraterm/vtterm.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 8103 by doda, Tue Sep 10 03:23:08 2019 UTC revision 8329 by doda, Thu Oct 24 10:41:21 2019 UTC
# Line 134  typedef TStatusBuff *PStatusBuff; Line 134  typedef TStatusBuff *PStatusBuff;
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    
# Line 341  void ResetTerminal() /*reset variables b Line 343  void ResetTerminal() /*reset variables b
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;
# Line 610  void Tab() Line 614  void Tab()
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;
# Line 617  void PutChar(BYTE b) Line 681  void PutChar(BYTE b)
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;
# Line 1778  void CSEraseCharacter()                // ECH Line 1844  void CSEraseCharacter()                // ECH
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: スクロールの最大値を端末行数に制限すべきか要検討
# Line 3938  void ParseCS(BYTE b) /* b is the final c Line 4012  void ParseCS(BYTE b) /* b is the final c
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
# Line 5814  int VTParse() Line 5888  int VTParse()
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          }          }

Legend:
Removed from v.8103  
changed lines
  Added in v.8329

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26