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 6841 by doda, Tue Jul 4 15:02:28 2017 UTC revision 6946 by doda, Tue Oct 17 09:38:20 2017 UTC
# Line 512  BOOL LogStart() Line 512  BOOL LogStart()
512                  logdir = ts.HomeDir;                  logdir = ts.HomeDir;
513          }          }
514    
515          if (strlen(&(LogVar->FullName[LogVar->DirLen]))==0)          if (strlen(&(LogVar->FullName[LogVar->DirLen]))==0) {
516          {                  Option = 0;
517                  // LOWORD                  if (ts.LogBinary) {
518                  // 0x0001 = Binary                          Option |= LOGDLG_BINARY;
519                  // HIWORD                  }
520                  // 0x0001 = Append                  if (ts.Append) {
521                  // 0x1000 = plain text (2005.2.20 yutaka)                          Option |= LOGDLG_APPEND;
522                  // 0x2000 = timestamp (2006.7.23 maya)                  }
523                  // 0x4000 = hide file transfer dialog (2008.1.30 maya)                  if (ts.LogTypePlainText) {
524                  // 0x8000 = Include screen buffer (2013.9.29 yutaka)                          Option |= LOGDLG_PLAINTEXT;
525                  // teraterm.iniの設定を見てからデフォルトオプションを決める。(2005.5.7 yutaka)                  }
526                  Option = MAKELONG(ts.LogBinary,                  if (ts.LogTimestamp) {
527                                    ts.Append |                          Option |= LOGDLG_TIMESTAMP;
528                                    (0x1000 * ts.LogTypePlainText) |                  }
529                                    (0x2000 * ts.LogTimestamp) |                  if (ts.LogHideDialog) {
530                                    (0x4000 * ts.LogHideDialog) |                          Option |= LOGDLG_HIDEDIALOG;
531                                    (0x8000 * ts.LogAllBuffIncludedInFirst)                  }
532                           );                  if (ts.LogAllBuffIncludedInFirst) {
533                            Option |= LOGDLG_INCSCRBUFF;
534                    }
535    
536                  // ログのデフォルトファイル名を設定 (2006.8.28 maya)                  // ログのデフォルトファイル名を設定 (2006.8.28 maya)
537                  strncat_s(LogVar->FullName, sizeof(LogVar->FullName), ts.LogDefaultName, _TRUNCATE);                  strncat_s(LogVar->FullName, sizeof(LogVar->FullName), ts.LogDefaultName, _TRUNCATE);
   
538                  ParseStrftimeFileName(LogVar->FullName, sizeof(LogVar->FullName));                  ParseStrftimeFileName(LogVar->FullName, sizeof(LogVar->FullName));
   
                 // &h をホスト名に置換 (2007.5.14)  
539                  ConvertLogname(LogVar->FullName, sizeof(LogVar->FullName));                  ConvertLogname(LogVar->FullName, sizeof(LogVar->FullName));
540    
541                  strncpy_s(LogVar->LogDefaultPath, sizeof(LogVar->LogDefaultPath), ts.LogDefaultPath, _TRUNCATE);                  strncpy_s(LogVar->LogDefaultPath, sizeof(LogVar->LogDefaultPath), ts.LogDefaultPath, _TRUNCATE);
542                  if (! (*GetTransFname)(LogVar, logdir, GTF_LOG, &Option))                  if (! (*GetTransFname)(LogVar, logdir, GTF_LOG, &Option)) {
                 {  
543                          FreeFileVar(&LogVar);                          FreeFileVar(&LogVar);
544                          FreeTTFILE();                          FreeTTFILE();
545                          return FALSE;                          return FALSE;
546                  }                  }
                 ts.LogBinary = LOWORD(Option);  
                 ts.Append = HIWORD(Option);  
   
                 if (ts.Append & 0x1000) {  
                         ts.LogTypePlainText = 1;  
                 } else {  
                         ts.LogTypePlainText = 0;  
                 }  
   
                 if (ts.Append & 0x2000) {  
                         ts.LogTimestamp = 1;  
                 }  
                 else {  
                         ts.LogTimestamp = 0;  
                 }  
   
                 if (ts.Append & 0x4000) {  
                         ts.LogHideDialog = 1;  
                 }  
                 else {  
                         ts.LogHideDialog = 0;  
                 }  
   
                 if (ts.Append & 0x8000) {  
                         ts.LogAllBuffIncludedInFirst = 1;  
                 }  
                 else {  
                         ts.LogAllBuffIncludedInFirst = 0;  
                 }  
   
                 ts.Append &= 0x1; // 1bitにマスクする  
547    
548                    ts.LogBinary = CheckFlag(Option, LOGDLG_BINARY);
549                            CheckFlag(Option, LOGDLG_BINARY);
550                    ts.Append =
551                            CheckFlag(Option, LOGDLG_APPEND);
552                    ts.LogTypePlainText =
553                            CheckFlag(Option, LOGDLG_PLAINTEXT);
554                    ts.LogTimestamp =
555                            CheckFlag(Option, LOGDLG_TIMESTAMP);
556                    ts.LogHideDialog =
557                            CheckFlag(Option, LOGDLG_HIDEDIALOG);
558                    ts.LogAllBuffIncludedInFirst =
559                            CheckFlag(Option, LOGDLG_INCSCRBUFF);
560          }          }
561          else {          else {
562                  // LogVar->DirLen = 0 だとここに来る                  // LogVar->DirLen = 0 だとここに来る
# Line 586  BOOL LogStart() Line 565  BOOL LogStart()
565    
566                  // フルパス化                  // フルパス化
567                  strncpy_s(FileName, sizeof(FileName), LogVar->FullName, _TRUNCATE);                  strncpy_s(FileName, sizeof(FileName), LogVar->FullName, _TRUNCATE);
568                  ConvFName(logdir,FileName,sizeof(FileName),"",LogVar->FullName,sizeof(LogVar->FullName));                  ConvFName(logdir, FileName, sizeof(FileName), "", LogVar->FullName, sizeof(LogVar->FullName));
569    
570                  ParseStrftimeFileName(LogVar->FullName, sizeof(LogVar->FullName));                  ParseStrftimeFileName(LogVar->FullName, sizeof(LogVar->FullName));
   
                 // &h をホスト名に置換 (2007.5.14)  
571                  ConvertLogname(LogVar->FullName, sizeof(LogVar->FullName));                  ConvertLogname(LogVar->FullName, sizeof(LogVar->FullName));
572    
573                  (*SetFileVar)(LogVar);                  (*SetFileVar)(LogVar);
574    
575                  FixLogOption();                  FixLogOption();
# Line 1111  void FreeBinBuf() Line 1089  void FreeBinBuf()
1089  extern "C" {  extern "C" {
1090  void FileSendStart()  void FileSendStart()
1091  {  {
1092          LONG Option;          LONG Option = 0;
1093    
1094          if (! cv.Ready || FSend) return;          if (! cv.Ready || FSend) return;
1095          if (cv.ProtoFlag)          if (cv.ProtoFlag)
# Line 1131  void FileSendStart() Line 1109  void FileSendStart()
1109    
1110          FSend = TRUE;          FSend = TRUE;
1111    
1112          if (strlen(&(SendVar->FullName[SendVar->DirLen]))==0)          if (strlen(&(SendVar->FullName[SendVar->DirLen]))==0) {
1113          {                  if (ts.TransBin)
1114                  Option = MAKELONG(ts.TransBin,0);                          Option |= LOGDLG_BINARY;
1115                  SendVar->FullName[0] = 0;                  SendVar->FullName[0] = 0;
1116                  if (! (*GetTransFname)(SendVar, ts.FileDir, GTF_SEND, &Option))                  if (! (*GetTransFname)(SendVar, ts.FileDir, GTF_SEND, &Option)) {
                 {  
1117                          FileTransEnd(OpSendFile);                          FileTransEnd(OpSendFile);
1118                          return;                          return;
1119                  }                  }
1120                  ts.TransBin = LOWORD(Option);                  ts.TransBin = CheckFlag(Option, LOGDLG_BINARY);
1121          }          }
1122          else          else
1123                  (*SetFileVar)(SendVar);                  (*SetFileVar)(SendVar);
# Line 1850  void ZMODEMStart(int mode) Line 1827  void ZMODEMStart(int mode)
1827  extern "C" {  extern "C" {
1828  void BPStart(int mode)  void BPStart(int mode)
1829  {  {
1830          LONG Option;          LONG Option = 0;
1831    
1832          if (! ProtoStart())          if (! ProtoStart())
1833                  return;                  return;

Legend:
Removed from v.6841  
changed lines
  Added in v.6946

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