Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/teraterm/teraterm/filesys_log.cpp

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

revision 6434 by yutakapon, Sat Apr 9 14:21:57 2016 UTC revision 6435 by doda, Mon Jul 11 08:53:02 2016 UTC
# Line 60  static char BracketEndStr[] = "\033[201~ Line 60  static char BracketEndStr[] = "\033[201~
60    
61  static BOOL FSend = FALSE;  static BOOL FSend = FALSE;
62    
63  HWND HWndLog = NULL; //steven add  HWND HWndLog = NULL; //steven add
64    
65  static HMODULE HTTFILE = NULL;  static HMODULE HTTFILE = NULL;
66  static int TTFILECount = 0;  static int TTFILECount = 0;
# Line 181  BOOL LoadTTFILE() Line 181  BOOL LoadTTFILE()
181          {          {
182                  FreeLibrary(HTTFILE);                  FreeLibrary(HTTFILE);
183                  HTTFILE = NULL;                  HTTFILE = NULL;
184                  return FALSE;                  return FALSE;
185          }          }
186          else {          else {
187                  TTFILECount = 1;                  TTFILECount = 1;
# Line 228  BOOL OpenFTDlg(PFileVar fv) Line 228  BOOL OpenFTDlg(PFileVar fv)
228                  FTDlg->Create(fv, &cv, &ts);                  FTDlg->Create(fv, &cv, &ts);
229                  FTDlg->RefreshNum();                  FTDlg->RefreshNum();
230                  if (fv->OpId == OpLog) {                  if (fv->OpId == OpLog) {
231                          HWndLog = FTDlg->m_hWnd; // steven add                          HWndLog = FTDlg->m_hWnd; // steven add
232                  }                  }
233          }          }
234    
# Line 408  static void CloseFileSync(PFileVar ptr) Line 408  static void CloseFileSync(PFileVar ptr)
408  }  }
409    
410  // 遅延書き込み用スレッド  // 遅延書き込み用スレッド
411  static unsigned _stdcall DeferredLogWriteThread(void *arg)  static unsigned _stdcall DeferredLogWriteThread(void *arg)
412  {  {
413          MSG msg;          MSG msg;
414          PFileVar fv = (PFileVar)arg;          PFileVar fv = (PFileVar)arg;
# Line 490  BOOL LogStart() Line 490  BOOL LogStart()
490                                    (0x1000 * ts.LogTypePlainText) |                                    (0x1000 * ts.LogTypePlainText) |
491                                    (0x2000 * ts.LogTimestamp) |                                    (0x2000 * ts.LogTimestamp) |
492                                    (0x4000 * ts.LogHideDialog) |                                    (0x4000 * ts.LogHideDialog) |
493                                    (0x8000 * ts.LogAllBuffIncludedInFirst)                                                                            (0x8000 * ts.LogAllBuffIncludedInFirst)
494                                                    );                           );
495    
496                  // ログのデフォルトファイル名を設定 (2006.8.28 maya)                  // ログのデフォルトファイル名を設定 (2006.8.28 maya)
497                  strncat_s(LogVar->FullName, sizeof(LogVar->FullName), ts.LogDefaultName, _TRUNCATE);                  strncat_s(LogVar->FullName, sizeof(LogVar->FullName), ts.LogDefaultName, _TRUNCATE);
# Line 813  static void LogRotate(void) Line 813  static void LogRotate(void)
813                  return;                  return;
814    
815          if (LogVar->RotateMode == ROTATE_SIZE) {          if (LogVar->RotateMode == ROTATE_SIZE) {
816                  if (LogVar->ByteCount <= LogVar->RotateSize)                  if (LogVar->ByteCount <= LogVar->RotateSize)
817                          return;                          return;
818                  //OutputDebugPrintf("%s: mode %d size %ld\n", __FUNCTION__, LogVar->RotateMode, LogVar->ByteCount);                  //OutputDebugPrintf("%s: mode %d size %ld\n", __FUNCTION__, LogVar->RotateMode, LogVar->ByteCount);
819          } else {          } else {
# Line 921  void LogToFile() Line 921  void LogToFile()
921                                          strncat_s(tmp, sizeof(tmp), strtime, _TRUNCATE);                                          strncat_s(tmp, sizeof(tmp), strtime, _TRUNCATE);
922                                          strncat_s(tmp, sizeof(tmp), "] ", _TRUNCATE);                                          strncat_s(tmp, sizeof(tmp), "] ", _TRUNCATE);
923                                  }                                  }
924                                    
925                                  /* 2007.05.24 Gentaro */                                  /* 2007.05.24 Gentaro */
926                                  if( b == 0x0a ){                                  if( b == 0x0a ){
927                                          eLineEnd = Line_LineHead; /* set endmark*/                                          eLineEnd = Line_LineHead; /* set endmark*/
# Line 971  void LogToFile() Line 971  void LogToFile()
971          #endif          #endif
972          #else          #else
973                                                  time_t tick = time(NULL);                                                  time_t tick = time(NULL);
974                                                  char *strtime = ctime(&tick);                                                  char *strtime = ctime(&tick);
975          #endif          #endif
976                                          /* 2007.05.24 Gentaro */                                          /* 2007.05.24 Gentaro */
977                                          if( eLineEnd == Line_FileHead ){                                          if( eLineEnd == Line_FileHead ){
# Line 991  void LogToFile() Line 991  void LogToFile()
991                                          WriteFile((HANDLE)LogVar->FileHandle, "] ", 2, &wrote, NULL);                                          WriteFile((HANDLE)LogVar->FileHandle, "] ", 2, &wrote, NULL);
992  #endif  #endif
993                                  }                                  }
994                                    
995                                  /* 2007.05.24 Gentaro */                                  /* 2007.05.24 Gentaro */
996                                  if( b == 0x0a ){                                  if( b == 0x0a ){
997                                          eLineEnd = Line_LineHead; /* set endmark*/                                          eLineEnd = Line_LineHead; /* set endmark*/
# Line 1101  void FileSendStart() Line 1101  void FileSendStart()
1101                  return;                  return;
1102          }          }
1103    
1104          if (! LoadTTFILE())          if (! LoadTTFILE())
1105                  return;                  return;
1106          if (! NewFileVar(&SendVar))          if (! NewFileVar(&SendVar))
1107          {          {
# Line 1178  void FileTransEnd(WORD OpId) Line 1178  void FileTransEnd(WORD OpId)
1178                  {                  {
1179                          FLogDlg->DestroyWindow();                          FLogDlg->DestroyWindow();
1180                          FLogDlg = NULL;                          FLogDlg = NULL;
1181                          HWndLog = NULL; // steven add                          HWndLog = NULL; // steven add
1182                  }                  }
1183                  FreeFileVar(&LogVar);                  FreeFileVar(&LogVar);
1184                  FreeLogBuf();                  FreeLogBuf();
# Line 1226  extern "C" { Line 1226  extern "C" {
1226  // - FileBracketMode == false  // - FileBracketMode == false
1227  // - cv.TelFlag == false  // - cv.TelFlag == false
1228  // - ts.LocalEcho == 0  // - ts.LocalEcho == 0
1229  void FileSendBinayBoost()  void FileSendBinayBoost()
1230  {  {
1231          WORD c, fc;          WORD c, fc;
1232          LONG BCOld;          LONG BCOld;
# Line 1459  BOOL OpenProtoDlg(PFileVar fv, int IdPro Line 1459  BOOL OpenProtoDlg(PFileVar fv, int IdPro
1459                          ((PXVar)ProtoVar)->XOpt = Opt1;                          ((PXVar)ProtoVar)->XOpt = Opt1;
1460                          ((PXVar)ProtoVar)->TextFlag = 1 - (Opt2 & 1);                          ((PXVar)ProtoVar)->TextFlag = 1 - (Opt2 & 1);
1461                          break;                          break;
1462                  case PROTO_YM:                    case PROTO_YM:
1463                          ((PYVar)ProtoVar)->YMode = Mode;                          ((PYVar)ProtoVar)->YMode = Mode;
1464                          ((PYVar)ProtoVar)->YOpt = Opt1;                          ((PYVar)ProtoVar)->YOpt = Opt1;
1465                          break;                          break;
# Line 1524  void CloseProtoDlg() Line 1524  void CloseProtoDlg()
1524                      (((PQVVar)ProtoVar)->QVMode==IdQVSend))                      (((PQVVar)ProtoVar)->QVMode==IdQVSend))
1525                          CommTextOut(&cv,"\015",1);                          CommTextOut(&cv,"\015",1);
1526                  if (FileVar->LogFlag)                  if (FileVar->LogFlag)
1527                          _lclose(FileVar->LogFile);                          _lclose(FileVar->LogFile);
1528                  FileVar->LogFile = 0;                  FileVar->LogFile = 0;
1529                  if (ProtoVar!=NULL)                  if (ProtoVar!=NULL)
1530                  {                  {
# Line 1645  void KermitStart(int mode) Line 1645  void KermitStart(int mode)
1645                          FileVar->OpId = OpKmtSend;                          FileVar->OpId = OpKmtSend;
1646                          if (strlen(&(FileVar->FullName[FileVar->DirLen]))==0)                          if (strlen(&(FileVar->FullName[FileVar->DirLen]))==0)
1647                          {                          {
1648                                  if (! (*GetGetFname)(FileVar->HMainWin,FileVar) ||                                  if (! (*GetGetFname)(FileVar->HMainWin,FileVar) ||
1649                                      (strlen(FileVar->FullName)==0))                                      (strlen(FileVar->FullName)==0))
1650                                  {                                  {
1651                                          ProtoEnd();                                          ProtoEnd();

Legend:
Removed from v.6434  
changed lines
  Added in v.6435

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