Develop and Download Open Source Software

Browse Subversion Repository

Diff of /branches/ssh_chacha20poly1305/ttssh2/ttxssh/ttxssh.c

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

revision 4533 by yutakapon, Tue Jul 26 15:07:33 2011 UTC revision 4546 by maya, Thu Jul 28 08:58:28 2011 UTC
# Line 892  void notify_verbose_message(PTInstVar pv Line 892  void notify_verbose_message(PTInstVar pv
892                               _S_IREAD | _S_IWRITE);                               _S_IREAD | _S_IWRITE);
893    
894                  if (file >= 0) {                  if (file >= 0) {
895                          time_t now = time(NULL);                          SYSTEMTIME LocalTime;
896                          char tmp[26];                          char strtime[29];
897                            char week[][4] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
898                            char month[][4] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
899                                               "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
900                          DWORD processid;                          DWORD processid;
901                          strcpy_s(tmp, sizeof(tmp), ctime(&now));                          char tmp[26];
902                          tmp[strlen(tmp)-1]= 0; // delete "\n"  
903                          _write(file, tmp, strlen(tmp));                          GetLocalTime(&LocalTime);
904                            _snprintf_s(strtime, sizeof(strtime), _TRUNCATE,
905                                        "%s %s %02d %02d:%02d:%02d.%03d %04d",
906                                        week[LocalTime.wDayOfWeek],
907                                        month[LocalTime.wMonth-1],
908                                        LocalTime.wDay,
909                                        LocalTime.wHour,
910                                        LocalTime.wMinute,
911                                        LocalTime.wSecond,
912                                        LocalTime.wMilliseconds,
913                                        LocalTime.wYear);
914                            _write(file, strtime, strlen(strtime));
915                          GetWindowThreadProcessId(pvar->cv->HWin, &processid);                          GetWindowThreadProcessId(pvar->cv->HWin, &processid);
916                          _snprintf_s(tmp, sizeof(tmp), _TRUNCATE, " [%lu] ",processid);                          _snprintf_s(tmp, sizeof(tmp), _TRUNCATE, " [%lu] ",processid);
917                          _write(file, tmp, strlen(tmp));                          _write(file, tmp, strlen(tmp));

Legend:
Removed from v.4533  
changed lines
  Added in v.4546

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