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.12 by yutakapon, Fri May 25 09:56:05 2007 UTC revision 1.14 by maya, Thu May 31 14:39:05 2007 UTC
# Line 306  extern "C" { Line 306  extern "C" {
306  void LogStart()  void LogStart()
307  {  {
308          LONG Option;          LONG Option;
309            char *logdir;
310    
311          if ((FileLog) || (BinLog)) return;          if ((FileLog) || (BinLog)) return;
312    
# Line 317  void LogStart() Line 318  void LogStart()
318          }          }
319          LogVar->OpId = OpLog;          LogVar->OpId = OpLog;
320    
321            if (strlen(ts.LogDefaultPath) > 0) {
322                    logdir = ts.LogDefaultPath;
323            }
324            else if (strlen(ts.FileDir) > 0) {
325                    logdir = ts.FileDir;
326            }
327            else {
328                    logdir = ts.HomeDir;
329            }
330    
331          if (strlen(&(LogVar->FullName[LogVar->DirLen]))==0)          if (strlen(&(LogVar->FullName[LogVar->DirLen]))==0)
332          {          {
333                  // LOWORD                  // LOWORD
# Line 331  void LogStart() Line 342  void LogStart()
342                                                    (0x2000 * ts.LogTimestamp));                                                    (0x2000 * ts.LogTimestamp));
343    
344                  // ログのデフォルトファイル名を設定 (2006.8.28 maya)                  // ログのデフォルトファイル名を設定 (2006.8.28 maya)
345                  strncat(LogVar->FullName, ts.LogDefaultName, sizeof(LogVar->FullName));                  strncat(LogVar->FullName, ts.LogDefaultName, sizeof(LogVar->FullName)-1);
346                    LogVar->FullName[sizeof(LogVar->FullName)-1] = '\0';
347    
348                  ParseStrftimeFileName(LogVar->FullName);                  ParseStrftimeFileName(LogVar->FullName);
349    
350                  // &h をホスト名に置換 (2007.5.14)                  // &h をホスト名に置換 (2007.5.14)
351                  ConvertLogname(LogVar->FullName);                  ConvertLogname(LogVar->FullName);
352    
353                  if (! (*GetTransFname)(LogVar, ts.FileDir, GTF_LOG, &Option))                  if (! (*GetTransFname)(LogVar, logdir, GTF_LOG, &Option))
354                  {                  {
355                          FreeFileVar(&LogVar);                          FreeFileVar(&LogVar);
356                          FreeTTFILE();                          FreeTTFILE();
# Line 363  void LogStart() Line 376  void LogStart()
376    
377          }          }
378          else {          else {
379                    // LogVar->DirLen = 0 だとここに来る
380                    // フルパス・相対パスともに LogVar->FullName に入れておく必要がある
381                    char FileName[MAX_PATH];
382    
383                    // フルパス化
384                    strncpy(FileName, LogVar->FullName, sizeof(FileName)-1);
385                    FileName[sizeof(FileName)-1] = '\0';
386                    ConvFName(logdir,FileName,"",LogVar->FullName);
387    
388                    ParseStrftimeFileName(LogVar->FullName);
389    
390                  // &h をホスト名に置換 (2007.5.14)                  // &h をホスト名に置換 (2007.5.14)
391                  ConvertLogname(LogVar->FullName);                  ConvertLogname(LogVar->FullName);
392                  (*SetFileVar)(LogVar);                  (*SetFileVar)(LogVar);
# Line 1276  void QVStart(int mode) Line 1300  void QVStart(int mode)
1300    
1301  /*  /*
1302   * $Log$   * $Log$
1303     * Revision 1.14  2007/05/31 14:39:05  maya
1304     * 接続時に自動的にログ採取を開始できるようにした。
1305     *
1306     * Revision 1.13  2007/05/30 16:04:27  maya
1307     * 標準のログ保存先を指定できるようにした。
1308     *
1309   * Revision 1.12  2007/05/25 09:56:05  yutakapon   * Revision 1.12  2007/05/25 09:56:05  yutakapon
1310   * タイムスタンプ付きログで1KBごとに不要な改行が入るバグを修正。   * タイムスタンプ付きログで1KBごとに不要な改行が入るバグを修正。
1311   *   *

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.14

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