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 8861 by zmatsuo, Sat Jul 25 16:00:36 2020 UTC revision 8863 by zmatsuo, Sat Jul 25 16:00:58 2020 UTC
# Line 634  static BOOL NeedsOutputBufs(void) Line 634  static BOOL NeedsOutputBufs(void)
634          return cv.HLogBuf != 0 || DDELog;          return cv.HLogBuf != 0 || DDELog;
635  }  }
636    
637    void TermLogSetCode(int code)
638    {
639            vtterm_work_t *vtterm = &vtterm_work;
640            vtterm->log_code = code;
641    }
642    
643    void TermLogOutputBOM(void)
644    {
645            vtterm_work_t *vtterm = &vtterm_work;
646            BOOL needs_unlock = FALSE;
647    
648            if ((cv.HLogBuf!=NULL) && (cv.LogBuf==NULL)) {
649                    cv.LogBuf = (PCHAR)GlobalLock(cv.HLogBuf);
650                    needs_unlock = TRUE;
651            }
652    
653            switch (vtterm->log_code) {
654            case 0:
655                    // UTF-8
656                    LogPut1(0xef);
657                    LogPut1(0xbb);
658                    LogPut1(0xbf);
659                    break;
660            case 1:
661                    // UTF-16LE
662                    LogPut1(0xfe);
663                    LogPut1(0xff);
664                    break;
665            case 2:
666                    // UTF-16BE
667                    LogPut1(0xff);
668                    LogPut1(0xfe);
669                    break;
670            default:
671                    break;
672            }
673    
674            if (needs_unlock) {
675                    GlobalUnlock(cv.HLogBuf);
676                    cv.LogBuf = NULL;
677            }
678    }
679    
680  void MoveToStatusLine()  void MoveToStatusLine()
681  {  {
682          MainX = CursorX;          MainX = CursorX;

Legend:
Removed from v.8861  
changed lines
  Added in v.8863

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