Develop and Download Open Source Software

Browse CVS Repository

Diff of /ttssh2/teraterm/source/teraterm/filesys.cpp

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

revision 1.1 by yutakakn, Mon Nov 15 14:43:41 2004 UTC revision 1.2 by yutakakn, Sun Feb 20 14:51:29 2005 UTC
# Line 224  void FreeFileVar(PFileVar *fv) Line 224  void FreeFileVar(PFileVar *fv)
224  extern "C" {  extern "C" {
225  void LogStart()  void LogStart()
226  {  {
227    LONG Option;          LONG Option;
228    
229    if ((FileLog) || (BinLog)) return;          if ((FileLog) || (BinLog)) return;
230    
231    if (! LoadTTFILE()) return;          if (! LoadTTFILE()) return;
232    if (! NewFileVar(&LogVar))          if (! NewFileVar(&LogVar))
233    {          {
234      FreeTTFILE();                  FreeTTFILE();
235      return;                  return;
236    }          }
237    LogVar->OpId = OpLog;          LogVar->OpId = OpLog;
238    
239    if (strlen(&(LogVar->FullName[LogVar->DirLen]))==0)          if (strlen(&(LogVar->FullName[LogVar->DirLen]))==0)
240    {          {
241      Option = MAKELONG(ts.TransBin,ts.Append);                  // 0x1000 = plain text (2005.2.20 yutaka)
242      if (! (*GetTransFname)(LogVar, ts.FileDir, GTF_LOG, &Option))                  Option = MAKELONG(ts.TransBin,ts.Append | 0x1000);
243      {                  if (! (*GetTransFname)(LogVar, ts.FileDir, GTF_LOG, &Option))
244        FreeFileVar(&LogVar);                  {
245        FreeTTFILE();                          FreeFileVar(&LogVar);
246        return;                          FreeTTFILE();
247      }                          return;
248      ts.TransBin = LOWORD(Option);                  }
249      ts.Append = HIWORD(Option);                  ts.TransBin = LOWORD(Option);
250    }                  ts.Append = HIWORD(Option);
   else  
     (*SetFileVar)(LogVar);  
251    
252    if (ts.TransBin > 0)                  if (ts.Append & 0x1000) {
253    {                          ts.LogTypePlainText = 1;
254      BinLog = TRUE;                  } else {
255      FileLog = FALSE;                          ts.LogTypePlainText = 0;
256      if (! CreateBinBuf())                  }
257      {                  ts.Append &= 0x1; // 1bitにマスクする
       FileTransEnd(OpLog);  
       return;  
     }  
   }  
   else {  
     BinLog = FALSE;  
     FileLog = TRUE;  
     if (! CreateLogBuf())  
     {  
       FileTransEnd(OpLog);  
       return;  
     }  
   }  
   cv.LStart = cv.LogPtr;  
   cv.LCount = 0;  
258    
259    HelpId = HlpFileLog;          }
260    if (ts.Append > 0)          else
261    {                  (*SetFileVar)(LogVar);
     LogVar->FileHandle = _lopen(LogVar->FullName,OF_WRITE);  
     if (LogVar->FileHandle>0)  
       _llseek(LogVar->FileHandle,0,2);  
     else  
       LogVar->FileHandle = _lcreat(LogVar->FullName,0);  
   }  
   else  
     LogVar->FileHandle = _lcreat(LogVar->FullName,0);  
   LogVar->FileOpen = (LogVar->FileHandle>0);  
   if (! LogVar->FileOpen)  
   {  
     FileTransEnd(OpLog);  
     return;  
   }  
   LogVar->ByteCount = 0;  
262    
263    if (! OpenFTDlg(LogVar))          if (ts.TransBin > 0)
264      FileTransEnd(OpLog);          {
265                    BinLog = TRUE;
266                    FileLog = FALSE;
267                    if (! CreateBinBuf())
268                    {
269                            FileTransEnd(OpLog);
270                            return;
271                    }
272            }
273            else {
274                    BinLog = FALSE;
275                    FileLog = TRUE;
276                    if (! CreateLogBuf())
277                    {
278                            FileTransEnd(OpLog);
279                            return;
280                    }
281            }
282            cv.LStart = cv.LogPtr;
283            cv.LCount = 0;
284    
285            HelpId = HlpFileLog;
286            if (ts.Append > 0)
287            {
288                    LogVar->FileHandle = _lopen(LogVar->FullName,OF_WRITE);
289                    if (LogVar->FileHandle>0)
290                            _llseek(LogVar->FileHandle,0,2);
291                    else
292                            LogVar->FileHandle = _lcreat(LogVar->FullName,0);
293            }
294            else
295                    LogVar->FileHandle = _lcreat(LogVar->FullName,0);
296            LogVar->FileOpen = (LogVar->FileHandle>0);
297            if (! LogVar->FileOpen)
298            {
299                    FileTransEnd(OpLog);
300                    return;
301            }
302            LogVar->ByteCount = 0;
303    
304            if (! OpenFTDlg(LogVar))
305                    FileTransEnd(OpLog);
306  }  }
307  }  }
308    
# Line 1063  void QVStart(int mode) Line 1072  void QVStart(int mode)
1072      ProtoEnd();      ProtoEnd();
1073  }  }
1074  }  }
1075    
1076    /*
1077     * $Log$
1078     * Revision 1.2  2005/02/20 14:51:29  yutakakn
1079     * ログファイルの種別に"plain text"を追加。このオプションが有効の場合は、ログファイルに
1080     * ASCII非表示文字の採取をしない。
1081     *
1082     * 現在、無視するキャラクタは以下のとおり。
1083     *  ・BS
1084     *  ・ASCII(0x00-0x1f)のうち非表示なもの
1085     *
1086     * ただし、例外として以下のものはログ採取対象。
1087     *  ・HT
1088     *  ・CR
1089     *  ・LF
1090     *
1091     */

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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