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.8 by maya, Thu Jan 4 15:11:44 2007 UTC revision 1.16 by maya, Wed Aug 8 15:56:35 2007 UTC
# Line 64  PProtoCancel ProtoCancel; Line 64  PProtoCancel ProtoCancel;
64  #define IdProtoTimeOutProc 9  #define IdProtoTimeOutProc 9
65  #define IdProtoCancel    10  #define IdProtoCancel    10
66    
67    /*
68       Line Head flag for timestamping
69       2007.05.24 Gentaro
70    */
71    enum enumLineEnd {
72            Line_Other = 0,
73            Line_LineHead = 1,
74            Line_FileHead = 2,
75    };
76    
77    enum enumLineEnd eLineEnd = Line_LineHead;
78    
79  BOOL LoadTTFILE()  BOOL LoadTTFILE()
80  {  {
81    BOOL Err;    BOOL Err;
# Line 165  static PProtoDlg PtDlg = NULL; Line 177  static PProtoDlg PtDlg = NULL;
177  BOOL OpenFTDlg(PFileVar fv)  BOOL OpenFTDlg(PFileVar fv)
178  {  {
179    PFileTransDlg FTDlg;    PFileTransDlg FTDlg;
180  #ifdef I18N  #ifndef NO_I18N
181    HWND HFTDlg;    HWND HFTDlg;
182  #endif  #endif
183    
# Line 173  BOOL OpenFTDlg(PFileVar fv) Line 185  BOOL OpenFTDlg(PFileVar fv)
185        
186    if (FTDlg!=NULL)    if (FTDlg!=NULL)
187    {    {
188  #ifdef I18N  #ifndef NO_I18N
189      FTDlg->Create(fv, &cv, &ts);      FTDlg->Create(fv, &cv, &ts);
190  #else  #else
191      FTDlg->Create(fv, &cv);      FTDlg->Create(fv, &cv);
# Line 188  BOOL OpenFTDlg(PFileVar fv) Line 200  BOOL OpenFTDlg(PFileVar fv)
200    else    else
201      SendDlg = FTDlg; /* File send */      SendDlg = FTDlg; /* File send */
202    
203  #ifdef I18N  #ifndef NO_I18N
204    HFTDlg=FTDlg->GetSafeHwnd();    HFTDlg=FTDlg->GetSafeHwnd();
205    
206    GetDlgItemText(HFTDlg, IDC_TRANS_FILENAME, ts.UIMsg, sizeof(ts.UIMsg));    GetDlgItemText(HFTDlg, IDC_TRANS_FILENAME, ts.UIMsg, sizeof(ts.UIMsg));
# Line 222  BOOL NewFileVar(PFileVar *fv) Line 234  BOOL NewFileVar(PFileVar *fv)
234      if ((*fv)!=NULL)      if ((*fv)!=NULL)
235      {      {
236        memset(*fv, 0, sizeof(TFileVar));        memset(*fv, 0, sizeof(TFileVar));
237        strcpy((*fv)->FullName,ts.FileDir);        strncpy_s((*fv)->FullName, sizeof((*fv)->FullName),ts.FileDir, _TRUNCATE);
238        AppendSlash((*fv)->FullName);        AppendSlash((*fv)->FullName,sizeof((*fv)->FullName));
239        (*fv)->DirLen = strlen((*fv)->FullName);        (*fv)->DirLen = strlen((*fv)->FullName);
240        (*fv)->FileOpen = FALSE;        (*fv)->FileOpen = FALSE;
241        (*fv)->OverWrite = ((ts.FTFlag & FT_RENAME) == 0);        (*fv)->OverWrite = ((ts.FTFlag & FT_RENAME) == 0);
# Line 251  void FreeFileVar(PFileVar *fv) Line 263  void FreeFileVar(PFileVar *fv)
263    }    }
264  }  }
265    
266    // &h をホスト名に置換 (2007.5.14)
267    void ConvertLogname(char *c, int destlen)
268    {
269      char buf[MAXPATHLEN], buf2[MAXPATHLEN], *p = c;
270    
271      memset(buf, 0, sizeof(buf));
272    
273      while(*p != '\0') {
274        if (*p == '&' && *(p+1) != '\0') {
275          switch (*(p+1)) {
276            case 'h':
277              if (cv.Open) {
278                if (cv.PortType == IdTCPIP) {
279                  strncat_s(buf,sizeof(buf),ts.HostName,_TRUNCATE);
280                }
281                else if (cv.PortType == IdSerial) {
282                  strncpy_s(buf2,sizeof(buf2),buf,_TRUNCATE);
283                  _snprintf_s(buf, sizeof(buf), _TRUNCATE, "%sCOM%d", buf2, ts.ComPort);
284                }
285              }
286              break;
287            default:
288              strncpy_s(buf2,sizeof(buf2),p,2);
289              strncat_s(buf,sizeof(buf),buf2,_TRUNCATE);
290          }
291          p++;
292        }
293        else {
294              strncpy_s(buf2,sizeof(buf2),p,1);
295              strncat_s(buf,sizeof(buf),buf2,_TRUNCATE);
296        }
297        p++;
298      }
299      strncpy_s(c, destlen, buf, _TRUNCATE);
300    }
301    
302  extern "C" {  extern "C" {
303  void LogStart()  void LogStart()
304  {  {
305          LONG Option;          LONG Option;
306            char *logdir;
307    
308          if ((FileLog) || (BinLog)) return;          if ((FileLog) || (BinLog)) return;
309    
# Line 266  void LogStart() Line 315  void LogStart()
315          }          }
316          LogVar->OpId = OpLog;          LogVar->OpId = OpLog;
317    
318            if (strlen(ts.LogDefaultPath) > 0) {
319                    logdir = ts.LogDefaultPath;
320            }
321            else if (strlen(ts.FileDir) > 0) {
322                    logdir = ts.FileDir;
323            }
324            else {
325                    logdir = ts.HomeDir;
326            }
327    
328          if (strlen(&(LogVar->FullName[LogVar->DirLen]))==0)          if (strlen(&(LogVar->FullName[LogVar->DirLen]))==0)
329          {          {
330                  // LOWORD                  // LOWORD
# Line 280  void LogStart() Line 339  void LogStart()
339                                                    (0x2000 * ts.LogTimestamp));                                                    (0x2000 * ts.LogTimestamp));
340    
341                  // ログのデフォルトファイル名を設定 (2006.8.28 maya)                  // ログのデフォルトファイル名を設定 (2006.8.28 maya)
342                  strncat(LogVar->FullName, ts.LogDefaultName, sizeof(LogVar->FullName));                  strncat_s(LogVar->FullName, sizeof(LogVar->FullName), ts.LogDefaultName, _TRUNCATE);
                 ParseStrftimeFileName(LogVar->FullName);  
343    
344  #ifdef I18N                  ParseStrftimeFileName(LogVar->FullName, sizeof(LogVar->FullName));
345                  if (! (*GetTransFname)(LogVar, ts.FileDir, GTF_LOG, &Option, &ts))  
346  #else                  // &h をホスト名に置換 (2007.5.14)
347                  if (! (*GetTransFname)(LogVar, ts.FileDir, GTF_LOG, &Option))                  ConvertLogname(LogVar->FullName, sizeof(LogVar->FullName));
348  #endif  
349                    if (! (*GetTransFname)(LogVar, logdir, GTF_LOG, &Option))
350                  {                  {
351                          FreeFileVar(&LogVar);                          FreeFileVar(&LogVar);
352                          FreeTTFILE();                          FreeTTFILE();
# Line 312  void LogStart() Line 371  void LogStart()
371                  ts.Append &= 0x1; // 1bitにマスクする                  ts.Append &= 0x1; // 1bitにマスクする
372    
373          }          }
374          else          else {
375  #ifdef I18N                  // LogVar->DirLen = 0 だとここに来る
376                  (*SetFileVar)(FileVar, &ts);                  // フルパス・相対パスともに LogVar->FullName に入れておく必要がある
377  #else                  char FileName[MAX_PATH];
378    
379                    // フルパス化
380                    strncpy_s(FileName, sizeof(FileName), LogVar->FullName, _TRUNCATE);
381                    ConvFName(logdir,FileName,sizeof(FileName),"",LogVar->FullName,sizeof(LogVar->FullName));
382    
383                    ParseStrftimeFileName(LogVar->FullName, sizeof(LogVar->FullName));
384    
385                    // &h をホスト名に置換 (2007.5.14)
386                    ConvertLogname(LogVar->FullName, sizeof(LogVar->FullName));
387                  (*SetFileVar)(LogVar);                  (*SetFileVar)(LogVar);
388  #endif          }
389    
390          if (ts.TransBin > 0)          if (ts.TransBin > 0)
391          {          {
# Line 342  void LogStart() Line 410  void LogStart()
410          cv.LCount = 0;          cv.LCount = 0;
411    
412          HelpId = HlpFileLog;          HelpId = HlpFileLog;
413            /* 2007.05.24 Gentaro */
414            eLineEnd = Line_LineHead;
415    
416          if (ts.Append > 0)          if (ts.Append > 0)
417          {          {
418                  LogVar->FileHandle = _lopen(LogVar->FullName,OF_WRITE);                  LogVar->FileHandle = _lopen(LogVar->FullName,OF_WRITE);
419                  if (LogVar->FileHandle>0)                  if (LogVar->FileHandle>0){
420                          _llseek(LogVar->FileHandle,0,2);                          _llseek(LogVar->FileHandle,0,2);
421                            /* 2007.05.24 Gentaro
422                                    If log file already exists,
423                                    a newline is inserted before the first timestamp.
424                            */
425                            eLineEnd = Line_FileHead;
426                    }
427                  else                  else
428                          LogVar->FileHandle = _lcreat(LogVar->FullName,0);                          LogVar->FileHandle = _lcreat(LogVar->FullName,0);
429          }          }
# Line 453  void CommentLogToFile(char *buf, int siz Line 530  void CommentLogToFile(char *buf, int siz
530          DWORD wrote;          DWORD wrote;
531    
532          if (LogVar == NULL || !LogVar->FileOpen) {          if (LogVar == NULL || !LogVar->FileOpen) {
533  #ifdef I18N  #ifndef NO_I18N
534                  char uimsg[MAX_UIMSG];                  char uimsg[MAX_UIMSG];
535                  strcpy(uimsg, "ERROR");                  strncpy_s(uimsg, sizeof(uimsg), "ERROR", _TRUNCATE);
536                  get_lang_msg("MSG_ERROR", uimsg, ts.UILanguageFile);                  get_lang_msg("MSG_ERROR", uimsg, ts.UILanguageFile);
537                  strcpy(ts.UIMsg, "It is not opened by the log file yet.");                  strncpy_s(ts.UIMsg, sizeof(ts.UIMsg), "It is not opened by the log file yet.", _TRUNCATE);
538                  get_lang_msg("MSG_COMMENT_LOG_OPEN_ERROR", ts.UIMsg, ts.UILanguageFile);                  get_lang_msg("MSG_COMMENT_LOG_OPEN_ERROR", ts.UIMsg, ts.UILanguageFile);
539                  ::MessageBox(NULL, ts.UIMsg, uimsg, MB_OK|MB_ICONEXCLAMATION);                  ::MessageBox(NULL, ts.UIMsg, uimsg, MB_OK|MB_ICONEXCLAMATION);
540  #else  #else
# Line 469  void CommentLogToFile(char *buf, int siz Line 546  void CommentLogToFile(char *buf, int siz
546          logfile_lock();          logfile_lock();
547          WriteFile((HANDLE)LogVar->FileHandle, buf, size, &wrote, NULL);          WriteFile((HANDLE)LogVar->FileHandle, buf, size, &wrote, NULL);
548          WriteFile((HANDLE)LogVar->FileHandle, "\r\n", 2, &wrote, NULL); // 改行          WriteFile((HANDLE)LogVar->FileHandle, "\r\n", 2, &wrote, NULL); // 改行
549            /* Set Line End Flag
550                    2007.05.24 Gentaro
551            */
552            eLineEnd = Line_LineHead;
553          logfile_unlock();          logfile_unlock();
554  }  }
555    
# Line 506  void LogToFile() Line 587  void LogToFile()
587                  {                  {
588                          // 時刻を書き出す(2006.7.23 maya)                          // 時刻を書き出す(2006.7.23 maya)
589                          // 日付フォーマットを日本ではなく世界標準に変更した (2006.7.23 yutaka)                          // 日付フォーマットを日本ではなく世界標準に変更した (2006.7.23 yutaka)
590                          if (ts.LogTimestamp &&                          /* 2007.05.24 Gentaro */
591                                  (Start == 1 || Buf[Start-2] == 0x0a)) {                          if ( ts.LogTimestamp && eLineEnd ) {
592  #if 0  #if 0
593                                  SYSTEMTIME      LocalTime;                                  SYSTEMTIME      LocalTime;
594                                  GetLocalTime(&LocalTime);                                  GetLocalTime(&LocalTime);
# Line 522  void LogToFile() Line 603  void LogToFile()
603                                          time_t tick = time(NULL);                                          time_t tick = time(NULL);
604                                          char *strtime = ctime(&tick);                                          char *strtime = ctime(&tick);
605  #endif  #endif
606                                    /* 2007.05.24 Gentaro */
607                                  // write to file                                  if( eLineEnd == Line_FileHead ){
608                                  if (Start == 1 && ts.Append) {                                          _lwrite(LogVar->FileHandle,"\r\n",2);
                                         _lwrite(LogVar->FileHandle,"\r\n",strlen("\r\n"));  
609                                  }                                  }
610                                  _lwrite(LogVar->FileHandle,"[",1);                                  _lwrite(LogVar->FileHandle,"[",1);
611                                  // 変換した文字列の終端に \n が含まれているので取り除く。                                  // 変換した文字列の終端に \n が含まれているので取り除く。
612                                  _lwrite(LogVar->FileHandle, strtime, strlen(strtime) - 1);                                  _lwrite(LogVar->FileHandle, strtime, strlen(strtime) - 1);
613                                  _lwrite(LogVar->FileHandle,"] ",2);                                  _lwrite(LogVar->FileHandle,"] ",2);
614                          }                          }
615                            
616                            /* 2007.05.24 Gentaro */
617                            if( b == 0x0a ){
618                                    eLineEnd = Line_LineHead; /* set endmark*/
619                            }
620                            else {
621                                    eLineEnd = Line_Other; /* clear endmark*/
622                            }
623    
624                          _lwrite(LogVar->FileHandle,(PCHAR)&b,1);                          _lwrite(LogVar->FileHandle,(PCHAR)&b,1);
625                          (LogVar->ByteCount)++;                          (LogVar->ByteCount)++;
# Line 634  void FileSendStart() Line 722  void FileSendStart()
722    {    {
723      Option = MAKELONG(ts.TransBin,0);      Option = MAKELONG(ts.TransBin,0);
724          SendVar->FullName[0] = 0;          SendVar->FullName[0] = 0;
 #ifdef I18N  
         if (! (*GetTransFname)(SendVar, ts.FileDir, GTF_SEND, &Option, &ts))  
 #else  
725      if (! (*GetTransFname)(SendVar, ts.FileDir, GTF_SEND, &Option))      if (! (*GetTransFname)(SendVar, ts.FileDir, GTF_SEND, &Option))
 #endif  
726          {          {
727        FileTransEnd(OpSendFile);        FileTransEnd(OpSendFile);
728        return;        return;
# Line 646  void FileSendStart() Line 730  void FileSendStart()
730      ts.TransBin = LOWORD(Option);      ts.TransBin = LOWORD(Option);
731    }    }
732    else    else
 #ifdef I18N  
     (*SetFileVar)(FileVar, &ts);  
 #else  
733      (*SetFileVar)(SendVar);      (*SetFileVar)(SendVar);
 #endif  
734    
735    SendVar->FileHandle = _lopen(SendVar->FullName,OF_READ);    SendVar->FileHandle = _lopen(SendVar->FullName,OF_READ);
736    SendVar->FileOpen = (SendVar->FileHandle>0);    SendVar->FileOpen = (SendVar->FileHandle>0);
# Line 816  BOOL OpenProtoDlg(PFileVar fv, int IdPro Line 896  BOOL OpenProtoDlg(PFileVar fv, int IdPro
896  {  {
897    int vsize;    int vsize;
898    PProtoDlg pd;    PProtoDlg pd;
899  #ifdef I18N  #ifndef NO_I18N
900    HWND Hpd;    HWND Hpd;
901  #endif  #endif
902    
# Line 870  BOOL OpenProtoDlg(PFileVar fv, int IdPro Line 950  BOOL OpenProtoDlg(PFileVar fv, int IdPro
950      ProtoVar = NULL;      ProtoVar = NULL;
951      return FALSE;      return FALSE;
952    }    }
953  #ifdef I18N  #ifndef NO_I18N
954    pd->Create(fv,&ts);    pd->Create(fv,&ts);
955  #else  #else
956    pd->Create(fv);    pd->Create(fv);
957  #endif  #endif
958    
959  #ifdef I18N  #ifndef NO_I18N
960    Hpd=pd->GetSafeHwnd();    Hpd=pd->GetSafeHwnd();
961    
962    GetDlgItemText(Hpd, IDC_PROT_FILENAME, ts.UIMsg, sizeof(ts.UIMsg));    GetDlgItemText(Hpd, IDC_PROT_FILENAME, ts.UIMsg, sizeof(ts.UIMsg));
# Line 975  int ProtoDlgParse() Line 1055  int ProtoDlgParse()
1055    P = ActiveWin;    P = ActiveWin;
1056    if (PtDlg==NULL) return P;    if (PtDlg==NULL) return P;
1057    
 #ifdef I18N  
   if ((*ProtoParse)(ProtoId,FileVar,ProtoVar,&cv,&ts))  
 #else  
1058    if ((*ProtoParse)(ProtoId,FileVar,ProtoVar,&cv))    if ((*ProtoParse)(ProtoId,FileVar,ProtoVar,&cv))
 #endif  
1059      P = 0; /* continue */      P = 0; /* continue */
1060    else {    else {
1061      CommSend(&cv);      CommSend(&cv);
# Line 1018  void KermitStart(int mode) Line 1094  void KermitStart(int mode)
1094        FileVar->OpId = OpKmtSend;        FileVar->OpId = OpKmtSend;
1095        if (strlen(&(FileVar->FullName[FileVar->DirLen]))==0)        if (strlen(&(FileVar->FullName[FileVar->DirLen]))==0)
1096        {        {
 #ifdef I18N  
         if (! (*GetMultiFname)(FileVar,ts.FileDir,GMF_KERMIT,&w,&ts) ||  
 #else  
1097          if (! (*GetMultiFname)(FileVar,ts.FileDir,GMF_KERMIT,&w) ||          if (! (*GetMultiFname)(FileVar,ts.FileDir,GMF_KERMIT,&w) ||
 #endif  
1098              (FileVar->NumFname==0))              (FileVar->NumFname==0))
1099          {          {
1100            ProtoEnd();            ProtoEnd();
# Line 1030  void KermitStart(int mode) Line 1102  void KermitStart(int mode)
1102          }          }
1103        }        }
1104        else        else
 #ifdef I18N  
     (*SetFileVar)(FileVar, &ts);  
 #else  
1105          (*SetFileVar)(FileVar);          (*SetFileVar)(FileVar);
 #endif  
1106            break;            break;
1107      case IdKmtReceive:      case IdKmtReceive:
1108        FileVar->OpId = OpKmtRcv;        FileVar->OpId = OpKmtRcv;
# Line 1051  void KermitStart(int mode) Line 1119  void KermitStart(int mode)
1119          }          }
1120        }        }
1121        else        else
 #ifdef I18N  
     (*SetFileVar)(FileVar, &ts);  
 #else  
1122          (*SetFileVar)(FileVar);          (*SetFileVar)(FileVar);
 #endif  
1123            break;            break;
1124      case IdKmtFinish:      case IdKmtFinish:
1125        FileVar->OpId = OpKmtFin;        FileVar->OpId = OpKmtFin;
# Line 1089  void XMODEMStart(int mode) Line 1153  void XMODEMStart(int mode)
1153    if (strlen(&(FileVar->FullName[FileVar->DirLen]))==0)    if (strlen(&(FileVar->FullName[FileVar->DirLen]))==0)
1154    {    {
1155      Option = MAKELONG(ts.XmodemBin,ts.XmodemOpt);      Option = MAKELONG(ts.XmodemBin,ts.XmodemOpt);
 #ifdef I18N  
     if (! (*GetXFname)(FileVar->HMainWin,  
       mode==IdXReceive,&Option,FileVar,ts.FileDir,&ts))  
 #else  
1156      if (! (*GetXFname)(FileVar->HMainWin,      if (! (*GetXFname)(FileVar->HMainWin,
1157        mode==IdXReceive,&Option,FileVar,ts.FileDir))        mode==IdXReceive,&Option,FileVar,ts.FileDir))
 #endif  
1158      {      {
1159        ProtoEnd();        ProtoEnd();
1160        return;        return;
# Line 1104  void XMODEMStart(int mode) Line 1163  void XMODEMStart(int mode)
1163      ts.XmodemBin = LOWORD(Option);      ts.XmodemBin = LOWORD(Option);
1164    }    }
1165    else    else
 #ifdef I18N  
     (*SetFileVar)(FileVar, &ts);  
 #else  
1166      (*SetFileVar)(FileVar);      (*SetFileVar)(FileVar);
 #endif  
1167    
1168    if (mode==IdXReceive)    if (mode==IdXReceive)
1169      FileVar->FileHandle = _lcreat(FileVar->FullName,0);      FileVar->FileHandle = _lcreat(FileVar->FullName,0);
# Line 1145  void ZMODEMStart(int mode) Line 1200  void ZMODEMStart(int mode)
1200      FileVar->OpId = OpZSend;      FileVar->OpId = OpZSend;
1201      if (strlen(&(FileVar->FullName[FileVar->DirLen]))==0)      if (strlen(&(FileVar->FullName[FileVar->DirLen]))==0)
1202      {      {
 #ifdef I18N  
       if (! (*GetMultiFname)(FileVar,ts.FileDir,GMF_Z,&Opt,&ts) ||  
 #else  
1203        if (! (*GetMultiFname)(FileVar,ts.FileDir,GMF_Z,&Opt) ||        if (! (*GetMultiFname)(FileVar,ts.FileDir,GMF_Z,&Opt) ||
 #endif  
1204            (FileVar->NumFname==0))            (FileVar->NumFname==0))
1205        {        {
1206          ProtoEnd();          ProtoEnd();
# Line 1158  void ZMODEMStart(int mode) Line 1209  void ZMODEMStart(int mode)
1209        ts.XmodemBin = Opt;        ts.XmodemBin = Opt;
1210      }      }
1211      else      else
 #ifdef I18N  
       (*SetFileVar)(FileVar, &ts);  
 #else  
1212        (*SetFileVar)(FileVar);        (*SetFileVar)(FileVar);
 #endif  
1213    }    }
1214    else /* IdZReceive or IdZAuto */    else /* IdZReceive or IdZAuto */
1215      FileVar->OpId = OpZRcv;      FileVar->OpId = OpZRcv;
# Line 1189  void BPStart(int mode) Line 1236  void BPStart(int mode)
1236      if (strlen(&(FileVar->FullName[FileVar->DirLen]))==0)      if (strlen(&(FileVar->FullName[FileVar->DirLen]))==0)
1237      {      {
1238            FileVar->FullName[0] = 0;            FileVar->FullName[0] = 0;
 #ifdef I18N  
       if (! (*GetTransFname)(FileVar, ts.FileDir, GTF_BP, &Option, &ts))  
 #else  
1239        if (! (*GetTransFname)(FileVar, ts.FileDir, GTF_BP, &Option))        if (! (*GetTransFname)(FileVar, ts.FileDir, GTF_BP, &Option))
 #endif  
1240            {            {
1241          ProtoEnd();          ProtoEnd();
1242          return;          return;
1243        }        }
1244      }      }
1245      else      else
 #ifdef I18N  
       (*SetFileVar)(FileVar, &ts);  
 #else  
1246        (*SetFileVar)(FileVar);        (*SetFileVar)(FileVar);
 #endif  
1247    }    }
1248    else /* IdBPReceive or IdBPAuto */    else /* IdBPReceive or IdBPAuto */
1249      FileVar->OpId = OpBPRcv;      FileVar->OpId = OpBPRcv;
# Line 1231  void QVStart(int mode) Line 1270  void QVStart(int mode)
1270      FileVar->OpId = OpQVSend;      FileVar->OpId = OpQVSend;
1271      if (strlen(&(FileVar->FullName[FileVar->DirLen]))==0)      if (strlen(&(FileVar->FullName[FileVar->DirLen]))==0)
1272      {      {
 #ifdef I18N  
       if (! (*GetMultiFname)(FileVar,ts.FileDir,GMF_QV, &W, &ts) ||  
 #else  
1273        if (! (*GetMultiFname)(FileVar,ts.FileDir,GMF_QV, &W) ||        if (! (*GetMultiFname)(FileVar,ts.FileDir,GMF_QV, &W) ||
 #endif  
1274            (FileVar->NumFname==0))            (FileVar->NumFname==0))
1275        {        {
1276          ProtoEnd();          ProtoEnd();
# Line 1243  void QVStart(int mode) Line 1278  void QVStart(int mode)
1278        }        }
1279      }      }
1280      else      else
 #ifdef I18N  
       (*SetFileVar)(FileVar, &ts);  
 #else  
1281        (*SetFileVar)(FileVar);        (*SetFileVar)(FileVar);
 #endif  
1282    }    }
1283    else    else
1284      FileVar->OpId = OpQVRcv;      FileVar->OpId = OpQVRcv;
# Line 1264  void QVStart(int mode) Line 1295  void QVStart(int mode)
1295    
1296  /*  /*
1297   * $Log$   * $Log$
1298     * Revision 1.16  2007/08/08 15:56:35  maya
1299     * 安全な関数を使用するように変更した。
1300     *
1301     * Revision 1.15  2007/06/06 14:02:53  maya
1302     * プリプロセッサにより構造体が変わってしまうので、INET6 と I18N の #define を逆転させた。
1303     *
1304     * Revision 1.14  2007/05/31 14:39:05  maya
1305     * 接続時に自動的にログ採取を開始できるようにした。
1306     *
1307     * Revision 1.13  2007/05/30 16:04:27  maya
1308     * 標準のログ保存先を指定できるようにした。
1309     *
1310     * Revision 1.12  2007/05/25 09:56:05  yutakapon
1311     * タイムスタンプ付きログで1KBごとに不要な改行が入るバグを修正。
1312     *
1313     * Revision 1.11  2007/05/14 14:07:14  maya
1314     * バッファをクリアしていないので落ちる問題を修正した。
1315     *
1316     * Revision 1.10  2007/05/14 13:29:58  maya
1317     * ログファイル名中の &h を、接続中のホスト名に変換する機能を追加した。
1318     *
1319     * Revision 1.9  2007/01/21 16:18:35  maya
1320     * 表示メッセージの読み込み対応
1321     *
1322   * Revision 1.8  2007/01/04 15:11:44  maya   * Revision 1.8  2007/01/04 15:11:44  maya
1323   * 表示メッセージの読み込み対応   * 表示メッセージの読み込み対応
1324   *   *

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.16

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