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 9872 by zmatsuo, Thu Apr 21 13:36:07 2022 UTC revision 9873 by zmatsuo, Thu Apr 21 13:36:16 2022 UTC
# Line 98  typedef struct { Line 98  typedef struct {
98    
99          BOOL FileLog;          BOOL FileLog;
100          BOOL BinLog;          BOOL BinLog;
101  } TFileVar_;  } TFileVar;
102  typedef TFileVar_ *PFileVar_;  typedef TFileVar *PFileVar;
   
 #define PFileVar PFileVar_  
 #define TFileVar TFileVar_  
103    
104  static PFileVar LogVar = NULL;  static PFileVar LogVar = NULL;
105    
# Line 115  static int cv_BinSkip; Line 112  static int cv_BinSkip;
112  // 遅延書き込み用スレッドのメッセージ  // 遅延書き込み用スレッドのメッセージ
113  #define WM_DPC_LOGTHREAD_SEND (WM_APP + 1)  #define WM_DPC_LOGTHREAD_SEND (WM_APP + 1)
114    
 static void FileTransEnd_(void);  
115  static void Log1Bin(BYTE b);  static void Log1Bin(BYTE b);
116  static void LogBinSkip(int add);  static void LogBinSkip(int add);
117  static BOOL CreateLogBuf(void);  static BOOL CreateLogBuf(void);
118  static BOOL CreateBinBuf(void);  static BOOL CreateBinBuf(void);
119  void LogPut1(BYTE b);  void LogPut1(BYTE b);
120  static void OutputStr(const wchar_t *str);  static void OutputStr(const wchar_t *str);
121  static void LogToFile(void);  static void LogToFile(PFileVar fv);
122  static void FLogOutputBOM(void);  static void FLogOutputBOM(PFileVar fv);
123    
124  static BOOL OpenFTDlg_(PFileVar fv)  static BOOL OpenFTDlg_(PFileVar fv)
125  {  {
# Line 228  static void FixLogOption(void) Line 224  static void FixLogOption(void)
224    
225    
226  // スレッドの終了とファイルのクローズ  // スレッドの終了とファイルのクローズ
227  static void CloseFileSync(PFileVar ptr)  static void CloseFileSync(PFileVar fv)
228  {  {
229          BOOL ret;          BOOL ret;
230    
231          if (ptr->FileHandle == INVALID_HANDLE_VALUE) {          if (fv->FileHandle == INVALID_HANDLE_VALUE) {
232                  return;                  return;
233          }          }
234    
235          if (ptr->LogThread != INVALID_HANDLE_VALUE) {          if (fv->LogThread != INVALID_HANDLE_VALUE) {
236                  // スレッドの終了待ち                  // スレッドの終了待ち
237                  ret = PostThreadMessage(ptr->LogThreadId, WM_QUIT, 0, 0);                  ret = PostThreadMessage(fv->LogThreadId, WM_QUIT, 0, 0);
238                  if (ret != 0) {                  if (ret != 0) {
239                          // スレッドキューにエンキューできた場合のみ待ち合わせを行う。                          // スレッドキューにエンキューできた場合のみ待ち合わせを行う。
240                          WaitForSingleObject(ptr->LogThread, INFINITE);                          WaitForSingleObject(fv->LogThread, INFINITE);
241                  }                  }
242                  else {                  else {
243                          //DWORD code = GetLastError();                          //DWORD code = GetLastError();
244                  }                  }
245                  CloseHandle(ptr->LogThread);                  CloseHandle(fv->LogThread);
246                  ptr->LogThread = INVALID_HANDLE_VALUE;                  fv->LogThread = INVALID_HANDLE_VALUE;
247          }          }
248          CloseHandle(ptr->FileHandle);          CloseHandle(fv->FileHandle);
249          ptr->FileHandle = INVALID_HANDLE_VALUE;          fv->FileHandle = INVALID_HANDLE_VALUE;
250  }  }
251    
252  // 遅延書き込み用スレッド  // 遅延書き込み用スレッド
# Line 274  static unsigned _stdcall DeferredLogWrit Line 270  static unsigned _stdcall DeferredLogWrit
270                          case WM_DPC_LOGTHREAD_SEND:                          case WM_DPC_LOGTHREAD_SEND:
271                                  buf = (PCHAR)msg.wParam;                                  buf = (PCHAR)msg.wParam;
272                                  buflen = (DWORD)msg.lParam;                                  buflen = (DWORD)msg.lParam;
273                                  WriteFile(LogVar->FileHandle, buf, buflen, &wrote, NULL);                                  WriteFile(fv->FileHandle, buf, buflen, &wrote, NULL);
274                                  free(buf);   // ここでメモリ解放                                  free(buf);   // ここでメモリ解放
275                                  break;                                  break;
276    
# Line 692  static void OpenLogFile(PFileVar fv) Line 688  static void OpenLogFile(PFileVar fv)
688          if (!ts.LogLockExclusive) {          if (!ts.LogLockExclusive) {
689                  dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;                  dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;
690          }          }
691          LogVar->FileHandle = CreateFileW(fv->FullName, GENERIC_WRITE, dwShareMode, NULL,          fv->FileHandle = CreateFileW(fv->FullName, GENERIC_WRITE, dwShareMode, NULL,
692                                                                           OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);                                                                   OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
693  }  }
694    
695  static BOOL LogStart(const wchar_t *fname)  static BOOL LogStart(PFileVar fv, const wchar_t *fname)
696  {  {
         PFileVar fv = LogVar;  
   
697          fv->FullName = _wcsdup(fname);          fv->FullName = _wcsdup(fname);
698          FixLogOption();          FixLogOption();
699    
# Line 743  static BOOL LogStart(const wchar_t *fnam Line 737  static BOOL LogStart(const wchar_t *fnam
737          // BOM出力          // BOM出力
738          if (ts.Append == 0 && ts.LogBinary == 0 && fv->bom) {          if (ts.Append == 0 && ts.LogBinary == 0 && fv->bom) {
739                  // 追記ではない(新規) && バイナリではない && BOM を出力時                  // 追記ではない(新規) && バイナリではない && BOM を出力時
740                  FLogOutputBOM();                  FLogOutputBOM(fv);
741          }          }
742    
743          // Log rotate configuration          // Log rotate configuration
# Line 796  static BOOL LogStart(const wchar_t *fnam Line 790  static BOOL LogStart(const wchar_t *fnam
790   */   */
791  void FLogOutputAllBuffer(void)  void FLogOutputAllBuffer(void)
792  {  {
793            PFileVar fv = LogVar;
794          DWORD ofs;          DWORD ofs;
795          int size;          int size;
796          wchar_t buf[512];          wchar_t buf[512];
# Line 807  void FLogOutputAllBuffer(void) Line 802  void FLogOutputAllBuffer(void)
802    
803                  OutputStr(buf);                  OutputStr(buf);
804                  OutputStr(L"\r\n");                  OutputStr(L"\r\n");
805                  LogToFile();                  LogToFile(fv);
806          }          }
807  }  }
808    
# Line 871  static inline void logfile_unlock(void) Line 866  static inline void logfile_unlock(void)
866    
867  // ログをローテートする。  // ログをローテートする。
868  // (2013.3.21 yutaka)  // (2013.3.21 yutaka)
869  static void LogRotate(void)  static void LogRotate(PFileVar fv)
870  {  {
871          int loopmax = 10000;  // XXX          int loopmax = 10000;  // XXX
872          int i, k;          int i, k;
873    
874          if (LogVar->RotateMode == ROTATE_NONE)          if (fv->RotateMode == ROTATE_NONE)
875                  return;                  return;
876    
877          if (LogVar->RotateMode == ROTATE_SIZE) {          if (fv->RotateMode == ROTATE_SIZE) {
878                  if (LogVar->ByteCount <= LogVar->RotateSize)                  if (fv->ByteCount <= fv->RotateSize)
879                          return;                          return;
880                  //OutputDebugPrintf("%s: mode %d size %ld\n", __FUNCTION__, LogVar->RotateMode, LogVar->ByteCount);                  //OutputDebugPrintf("%s: mode %d size %ld\n", __FUNCTION__, fv->RotateMode, fv->ByteCount);
881          } else {          } else {
882                  return;                  return;
883          }          }
884    
885          logfile_lock();          logfile_lock();
886          // ログサイズを再初期化する。          // ログサイズを再初期化する。
887          LogVar->ByteCount = 0;          fv->ByteCount = 0;
888    
889          // いったん今のファイルをクローズして、別名のファイルをオープンする。          // いったん今のファイルをクローズして、別名のファイルをオープンする。
890          CloseFileSync(LogVar);          CloseFileSync(fv);
891    
892          // 世代ローテーションのステップ数の指定があるか          // 世代ローテーションのステップ数の指定があるか
893          if (LogVar->RotateStep > 0)          if (fv->RotateStep > 0)
894                  loopmax = LogVar->RotateStep;                  loopmax = fv->RotateStep;
895    
896          for (i = 1 ; i <= loopmax ; i++) {          for (i = 1 ; i <= loopmax ; i++) {
897                  wchar_t *filename;                  wchar_t *filename;
898                  aswprintf(&filename, L"%s.%d", LogVar->FullName, i);                  aswprintf(&filename, L"%s.%d", fv->FullName, i);
899                  DWORD attr = GetFileAttributesW(filename);                  DWORD attr = GetFileAttributesW(filename);
900                  free(filename);                  free(filename);
901                  if (attr == INVALID_FILE_ATTRIBUTES)                  if (attr == INVALID_FILE_ATTRIBUTES)
# Line 915  static void LogRotate(void) Line 910  static void LogRotate(void)
910          for (k = i-1 ; k >= 0 ; k--) {          for (k = i-1 ; k >= 0 ; k--) {
911                  wchar_t *oldfile;                  wchar_t *oldfile;
912                  if (k == 0)                  if (k == 0)
913                          oldfile = _wcsdup(LogVar->FullName);                          oldfile = _wcsdup(fv->FullName);
914                  else                  else
915                          aswprintf(&oldfile, L"%s.%d", LogVar->FullName, k);                          aswprintf(&oldfile, L"%s.%d", fv->FullName, k);
916                  wchar_t *newfile;                  wchar_t *newfile;
917                  aswprintf(&newfile, L"%s.%d", LogVar->FullName, k+1);                  aswprintf(&newfile, L"%s.%d", fv->FullName, k+1);
918                  DeleteFileW(newfile);                  DeleteFileW(newfile);
919                  if (MoveFileW(oldfile, newfile) == 0) {                  if (MoveFileW(oldfile, newfile) == 0) {
920                          OutputDebugPrintf("%s: rename %d\n", __FUNCTION__, errno);                          OutputDebugPrintf("%s: rename %d\n", __FUNCTION__, errno);
# Line 929  static void LogRotate(void) Line 924  static void LogRotate(void)
924          }          }
925    
926          // 再オープン          // 再オープン
927          OpenLogFile(LogVar);          OpenLogFile(fv);
928          if (LogVar->bom) {          if (fv->bom) {
929                  FLogOutputBOM();                  FLogOutputBOM(fv);
930          }          }
931          if (ts.DeferredLogWriteMode) {          if (ts.DeferredLogWriteMode) {
932                  StartThread(LogVar);                  StartThread(fv);
933          }          }
934    
935          logfile_unlock();          logfile_unlock();
936  }  }
937    
938  static wchar_t *TimeStampStr()  static wchar_t *TimeStampStr(PFileVar fv)
939  {  {
940          char *strtime = NULL;          char *strtime = NULL;
941          switch (ts.LogTimestampType) {          switch (ts.LogTimestampType) {
# Line 952  static wchar_t *TimeStampStr() Line 947  static wchar_t *TimeStampStr()
947                  strtime = mctimelocal(ts.LogTimestampFormat, TRUE);                  strtime = mctimelocal(ts.LogTimestampFormat, TRUE);
948                  break;                  break;
949          case TIMESTAMP_ELAPSED_LOGSTART:          case TIMESTAMP_ELAPSED_LOGSTART:
950                  strtime = strelapsed(LogVar->StartTime);                  strtime = strelapsed(fv->StartTime);
951                  break;                  break;
952          case TIMESTAMP_ELAPSED_CONNECTED:          case TIMESTAMP_ELAPSED_CONNECTED:
953                  strtime = strelapsed(cv.ConnectedTime);                  strtime = strelapsed(cv.ConnectedTime);
# Line 971  static wchar_t *TimeStampStr() Line 966  static wchar_t *TimeStampStr()
966  /**  /**
967   * バッファ内のログをファイルへ書き込む   * バッファ内のログをファイルへ書き込む
968   */   */
969  static void LogToFile(void)  static void LogToFile(PFileVar fv)
970  {  {
         PFileVar fv = LogVar;  
971          PCHAR Buf;          PCHAR Buf;
972          int Start, Count;          int Start, Count;
973          BYTE b;          BYTE b;
# Line 1015  static void LogToFile(void) Line 1009  static void LogToFile(void)
1009    
1010                  WriteBuf[WriteBufLen++] = b;                  WriteBuf[WriteBufLen++] = b;
1011    
1012                  (LogVar->ByteCount)++;                  (fv->ByteCount)++;
1013          }          }
1014    
1015          // 書き込み          // 書き込み
1016          if (WriteBufLen > 0) {          if (WriteBufLen > 0) {
1017                  if (ts.DeferredLogWriteMode) {                  if (ts.DeferredLogWriteMode) {
1018                          PostThreadMessage(LogVar->LogThreadId, WM_DPC_LOGTHREAD_SEND, (WPARAM)WriteBuf, WriteBufLen);                          PostThreadMessage(fv->LogThreadId, WM_DPC_LOGTHREAD_SEND, (WPARAM)WriteBuf, WriteBufLen);
1019                  }                  }
1020                  else {                  else {
1021                          DWORD wrote;                          DWORD wrote;
1022                          WriteFile(LogVar->FileHandle, WriteBuf, WriteBufLen, &wrote, NULL);                          WriteFile(fv->FileHandle, WriteBuf, WriteBufLen, &wrote, NULL);
1023                          free(WriteBuf);                          free(WriteBuf);
1024                  }                  }
1025          }          }
# Line 1042  static void LogToFile(void) Line 1036  static void LogToFile(void)
1036                  cv_BCount = Count;                  cv_BCount = Count;
1037          }          }
1038          if (FLogIsPause() || ProtoGetProtoFlag()) return;          if (FLogIsPause() || ProtoGetProtoFlag()) return;
1039          LogVar->FLogDlg->RefreshNum(LogVar->StartTime, LogVar->FileSize, LogVar->ByteCount);          fv->FLogDlg->RefreshNum(fv->StartTime, fv->FileSize, fv->ByteCount);
1040    
1041    
1042          // ログ・ローテート          // ログ・ローテート
1043          LogRotate();          LogRotate(fv);
1044  }  }
1045    
1046  static BOOL CreateLogBuf(void)  static BOOL CreateLogBuf(void)
# Line 1091  static void FreeBinBuf(void) Line 1085  static void FreeBinBuf(void)
1085          cv_BCount = 0;          cv_BCount = 0;
1086  }  }
1087    
1088  static void FileTransEnd_(void)  static void FileTransEnd_(PFileVar fv)
1089  {  {
         if (LogVar == NULL) {  
                 return;  
         }  
         PFileVar fv = LogVar;  
1090          fv->FileLog = FALSE;          fv->FileLog = FALSE;
1091          fv->BinLog = FALSE;          fv->BinLog = FALSE;
1092          cv.Log1Byte = NULL;          cv.Log1Byte = NULL;
1093          cv.Log1Bin = NULL;          cv.Log1Bin = NULL;
1094          cv.LogBinSkip = NULL;          cv.LogBinSkip = NULL;
1095          PFileTransDlg FLogDlg = LogVar->FLogDlg;          PFileTransDlg FLogDlg = fv->FLogDlg;
1096          if (FLogDlg != NULL) {          if (FLogDlg != NULL) {
1097                  FLogDlg->DestroyWindow();                  FLogDlg->DestroyWindow();
1098                  FLogDlg = NULL;                  FLogDlg = NULL;
1099                  LogVar->FLogDlg = NULL;                  fv->FLogDlg = NULL;
1100          }          }
1101          CloseFileSync(LogVar);          CloseFileSync(fv);
1102          FreeLogBuf();          FreeLogBuf();
1103          FreeBinBuf();          FreeBinBuf();
1104          free(LogVar->FullName);          free(fv->FullName);
1105          LogVar->FullName = NULL;          fv->FullName = NULL;
1106          free(LogVar);          free(fv);
1107    
1108          LogVar = NULL;          LogVar = NULL;
1109  }  }
1110    
# Line 1122  static void FileTransEnd_(void) Line 1113  static void FileTransEnd_(void)
1113   */   */
1114  void FLogPause(BOOL Pause)  void FLogPause(BOOL Pause)
1115  {  {
1116          if (LogVar == NULL) {          PFileVar fv = LogVar;
1117            if (fv == NULL) {
1118                  return;                  return;
1119          }          }
1120          LogVar->IsPause = Pause;          fv->IsPause = Pause;
1121          LogVar->FLogDlg->ChangeButton(Pause);          fv->FLogDlg->ChangeButton(Pause);
1122  }  }
1123    
1124  /**  /**
# Line 1135  void FLogPause(BOOL Pause) Line 1127  void FLogPause(BOOL Pause)
1127   */   */
1128  void FLogRotateSize(size_t size)  void FLogRotateSize(size_t size)
1129  {  {
1130          if (LogVar == NULL) {          PFileVar fv = LogVar;
1131            if (fv == NULL) {
1132                  return;                  return;
1133          }          }
1134          LogVar->RotateMode = ROTATE_SIZE;          fv->RotateMode = ROTATE_SIZE;
1135          LogVar->RotateSize = (LONG)size;          fv->RotateSize = (LONG)size;
1136  }  }
1137    
1138  /**  /**
# Line 1148  void FLogRotateSize(size_t size) Line 1141  void FLogRotateSize(size_t size)
1141   */   */
1142  void FLogRotateRotate(int step)  void FLogRotateRotate(int step)
1143  {  {
1144          if (LogVar == NULL) {          PFileVar fv = LogVar;
1145            if (fv == NULL) {
1146                  return;                  return;
1147          }          }
1148          LogVar->RotateStep = step;          fv->RotateStep = step;
1149  }  }
1150    
1151  /**  /**
# Line 1160  void FLogRotateRotate(int step) Line 1154  void FLogRotateRotate(int step)
1154   */   */
1155  void FLogRotateHalt(void)  void FLogRotateHalt(void)
1156  {  {
1157          if (LogVar == NULL) {          PFileVar fv = LogVar;
1158            if (fv == NULL) {
1159                  return;                  return;
1160          }          }
1161          LogVar->RotateMode = ROTATE_NONE;          fv->RotateMode = ROTATE_NONE;
1162          LogVar->RotateSize = 0;          fv->RotateSize = 0;
1163          LogVar->RotateStep = 0;          fv->RotateStep = 0;
1164  }  }
1165    
1166  static INT_PTR CALLBACK OnCommentDlgProc(HWND hDlgWnd, UINT msg, WPARAM wp, LPARAM)  static INT_PTR CALLBACK OnCommentDlgProc(HWND hDlgWnd, UINT msg, WPARAM wp, LPARAM)
# Line 1215  static INT_PTR CALLBACK OnCommentDlgProc Line 1210  static INT_PTR CALLBACK OnCommentDlgProc
1210   */   */
1211  void FLogAddCommentDlg(HINSTANCE hInst, HWND hWnd)  void FLogAddCommentDlg(HINSTANCE hInst, HWND hWnd)
1212  {  {
1213          if (LogVar == NULL) {          PFileVar fv = LogVar;
1214            if (fv == NULL) {
1215                  return;                  return;
1216          }          }
1217          TTDialogBox(hInst, MAKEINTRESOURCE(IDD_COMMENT_DIALOG),          TTDialogBox(hInst, MAKEINTRESOURCE(IDD_COMMENT_DIALOG),
# Line 1224  void FLogAddCommentDlg(HINSTANCE hInst, Line 1220  void FLogAddCommentDlg(HINSTANCE hInst,
1220    
1221  void FLogClose(void)  void FLogClose(void)
1222  {  {
1223          if (LogVar == NULL) {          PFileVar fv = LogVar;
1224            if (fv == NULL) {
1225                  return;                  return;
1226          }          }
1227    
1228          FileTransEnd_();          FileTransEnd_(fv);
1229  }  }
1230    
1231  /**  /**
# Line 1241  void FLogClose(void) Line 1238  void FLogClose(void)
1238   */   */
1239  BOOL FLogOpen(const wchar_t *fname, LogCode_t code, BOOL bom)  BOOL FLogOpen(const wchar_t *fname, LogCode_t code, BOOL bom)
1240  {  {
         BOOL ret;  
   
1241          if (LogVar != NULL) {          if (LogVar != NULL) {
1242                  return FALSE;                  return FALSE;
1243          }          }
1244    
1245          //          //
1246          PFileVar fv = (PFileVar)malloc(sizeof(TFileVar));          PFileVar fv = (PFileVar)malloc(sizeof(*fv));
1247          if (fv == NULL) {          if (fv == NULL) {
1248                  return FALSE;                  return FALSE;
1249          }          }
# Line 1260  BOOL FLogOpen(const wchar_t *fname, LogC Line 1255  BOOL FLogOpen(const wchar_t *fname, LogC
1255    
1256          fv->log_code = code;          fv->log_code = code;
1257          fv->bom = bom;          fv->bom = bom;
1258          ret = LogStart(fname);          BOOL ret = LogStart(fv, fname);
1259          if (ret == FALSE) {          if (ret == FALSE) {
1260                  FileTransEnd_();                  FileTransEnd_(fv);
1261          }          }
1262    
1263          return ret;          return ret;
# Line 1292  void FLogWriteStr(const wchar_t *str) Line 1287  void FLogWriteStr(const wchar_t *str)
1287    
1288  void FLogInfo(char *param_ptr, size_t param_len)  void FLogInfo(char *param_ptr, size_t param_len)
1289  {  {
1290          if (LogVar) {          PFileVar fv = LogVar;
1291            if (fv) {
1292                  param_ptr[0] = '0'                  param_ptr[0] = '0'
1293                          + (ts.LogBinary != 0)                          + (ts.LogBinary != 0)
1294                          + ((ts.Append != 0) << 1)                          + ((ts.Append != 0) << 1)
1295                          + ((ts.LogTypePlainText != 0) << 2)                          + ((ts.LogTypePlainText != 0) << 2)
1296                          + ((ts.LogTimestamp != 0) << 3)                          + ((ts.LogTimestamp != 0) << 3)
1297                          + ((ts.LogHideDialog != 0) << 4);                          + ((ts.LogHideDialog != 0) << 4);
1298                  char *filenameU8 = ToU8W(LogVar->FullName);                  char *filenameU8 = ToU8W(fv->FullName);
1299                  strncpy_s(param_ptr + 1, param_len - 1, filenameU8, _TRUNCATE);                  strncpy_s(param_ptr + 1, param_len - 1, filenameU8, _TRUNCATE);
1300                  free(filenameU8);                  free(filenameU8);
1301          }          }
# Line 1495  void FLogWriteFile(void) Line 1491  void FLogWriteFile(void)
1491          if (cv_LogBuf!=NULL)          if (cv_LogBuf!=NULL)
1492          {          {
1493                  if (fv->FileLog) {                  if (fv->FileLog) {
1494                          LogToFile();                          LogToFile(fv);
1495                  }                  }
1496          }          }
1497    
1498          if (cv_BinBuf!=NULL)          if (cv_BinBuf!=NULL)
1499          {          {
1500                  if (fv->BinLog) {                  if (fv->BinLog) {
1501                          LogToFile();                          LogToFile(fv);
1502                  }                  }
1503          }          }
1504  }  }
# Line 1521  void FLogPutUTF32(unsigned int u32) Line 1517  void FLogPutUTF32(unsigned int u32)
1517          if (ts.LogTimestamp && fv->eLineEnd) {          if (ts.LogTimestamp && fv->eLineEnd) {
1518                  // タイムスタンプを出力                  // タイムスタンプを出力
1519                  fv->eLineEnd = Line_Other; /* clear endmark*/                  fv->eLineEnd = Line_Other; /* clear endmark*/
1520                  wchar_t* strtime = TimeStampStr();                  wchar_t* strtime = TimeStampStr(fv);
1521                  FLogWriteStr(strtime);                  FLogWriteStr(strtime);
1522                  free(strtime);                  free(strtime);
1523          }          }
# Line 1562  void FLogPutUTF32(unsigned int u32) Line 1558  void FLogPutUTF32(unsigned int u32)
1558          }          }
1559  }  }
1560    
1561  static void FLogOutputBOM(void)  static void FLogOutputBOM(PFileVar fv)
1562  {  {
         PFileVar fv = LogVar;  
1563          DWORD wrote;          DWORD wrote;
1564    
1565          switch(fv->log_code) {          switch(fv->log_code) {

Legend:
Removed from v.9872  
changed lines
  Added in v.9873

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