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.13 by maya, Wed May 30 16:04:27 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 332  void LogStart() Line 343  void LogStart()
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));
346    
347                  ParseStrftimeFileName(LogVar->FullName);                  ParseStrftimeFileName(LogVar->FullName);
348    
349                  // &h をホスト名に置換 (2007.5.14)                  // &h をホスト名に置換 (2007.5.14)
350                  ConvertLogname(LogVar->FullName);                  ConvertLogname(LogVar->FullName);
351    
352                  if (! (*GetTransFname)(LogVar, ts.FileDir, GTF_LOG, &Option))                  if (! (*GetTransFname)(LogVar, logdir, GTF_LOG, &Option))
353                  {                  {
354                          FreeFileVar(&LogVar);                          FreeFileVar(&LogVar);
355                          FreeTTFILE();                          FreeTTFILE();
# Line 363  void LogStart() Line 375  void LogStart()
375    
376          }          }
377          else {          else {
378                    // LogVar->DirLen = 0 だとここに来る
379                    // フルパス・相対パスともに LogVar->FullName に入れておく必要がある
380                    char FileName[MAX_PATH];
381    
382                    // フルパス化
383                    strncpy(FileName, LogVar->FullName, sizeof(FileName)-1);
384                    ConvFName(logdir,FileName,"",LogVar->FullName);
385    
386                    ParseStrftimeFileName(LogVar->FullName);
387    
388                  // &h をホスト名に置換 (2007.5.14)                  // &h をホスト名に置換 (2007.5.14)
389                  ConvertLogname(LogVar->FullName);                  ConvertLogname(LogVar->FullName);
390                  (*SetFileVar)(LogVar);                  (*SetFileVar)(LogVar);
# Line 1276  void QVStart(int mode) Line 1298  void QVStart(int mode)
1298    
1299  /*  /*
1300   * $Log$   * $Log$
1301     * Revision 1.13  2007/05/30 16:04:27  maya
1302     * 標準のログ保存先を指定できるようにした。
1303     *
1304   * Revision 1.12  2007/05/25 09:56:05  yutakapon   * Revision 1.12  2007/05/25 09:56:05  yutakapon
1305   * タイムスタンプ付きログで1KBごとに不要な改行が入るバグを修正。   * タイムスタンプ付きログで1KBごとに不要な改行が入るバグを修正。
1306   *   *

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

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