r455: no message
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 27 Jan 2001 22:10:11 +0000 (22:10 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 27 Jan 2001 22:10:11 +0000 (22:10 +0000)
ChangeLog
include/timer.h
msvc/ctsim/ctsim.plg
src/ctsim.cpp

index 64c37a324d85e38329c5f6a01c6a40b6e45413e8..6b18e097f08a85a046d37e15d7a9e8c6ddff928f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,7 +15,9 @@
 
        * ctsim: Fixed tick-label placement for plots on projection and
        reconstruction dialogs.
-       
+
+       * timer.h: Add use of _ftime when compiling on MSVC
+
        * pjinfo: Fixed bug when doing --dump and not specifing --endview
 
        * ctsimtext-lam: Changes for first version to compile under lam
index d0b5d7f508466219ea690dd618d90e8f9a409440..2200685db7cf338e698b891ae944824938d6db47 100644 (file)
@@ -6,6 +6,10 @@
 #include <sys/time.h>
 #endif
 
+#ifdef MSVC
+#include <sys/timeb.h>
+#endif
+
 class Timer
 {
  public:
@@ -51,6 +55,10 @@ class Timer
                return 0;
            
            return (now.tv_sec + static_cast<double>(now.tv_usec) / 1000000.);
+#elif defined(MSVC)
+               struct _timeb now;
+               _ftime (&now);
+               return (now.time + static_cast<double>(now.millitm) / 1000.);
 #else
            return 0;
 #endif
index dff571572bda206d814f2683cabb36339e986331..ecc9d6047a2273a4bb4cc12ac65e1f5181a18b43 100644 (file)
@@ -6,13 +6,13 @@
 --------------------Configuration: ctsim - Win32 Debug--------------------
 </h3>
 <h3>Command Lines</h3>
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP13E0.tmp" with contents
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP140A.tmp" with contents
 [
 /nologo /G6 /MTd /W3 /Gm /GR /GX /Zi /Od /I "\wx2\include" /I "." /I "..\..\include" /I "..\..\getopt" /I "..\..\..\lpng108" /I "..\..\..\zlib" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /D VERSION=\"2.5.0\" /D "_DEBUG" /D "__WXMSW__" /D "HAVE_SGP" /D "HAVE_PNG" /D "HAVE_WXWINDOWS" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "HAVE_STRING_H" /D "HAVE_FFTW" /D "HAVE_RFFTW" /D "HAVE_GETOPT_H" /D "MSVC" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D CTSIMVERSION=\"3.0.0alpha5\" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c 
 "D:\ctsim\src\ctsim.cpp"
 ]
-Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP13E0.tmp" 
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP13E1.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP140A.tmp" 
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP140B.tmp" with contents
 [
 comctl32.lib winmm.lib rpcrt4.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../libctsim/Debug/libctsim.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\..\lpng108\msvc\win32\libpng\lib_dbg\libpng.lib ..\..\..\lpng108\msvc\win32\zlib\lib_dbg\zlib.lib libcmtd.lib ..\..\..\fftw-2.1.3\Win32\FFTW2st\Debug\FFTW2st.lib ..\..\..\fftw-2.1.3\Win32\RFFTW2st\Debug\RFFTW2st.lib ../../../wx2/lib/wxd.lib xpmd.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/ctsim.pdb" /debug /machine:I386 /out:"Debug/ctsim.exe" /pdbtype:sept /libpath:"..\..\..\lpng108\msvc\win32\libpng\lib" /libpath:"..\..\..\lpng108\msvc\win32\zlib\lib" /libpath:"..\..\..\wx2\lib" 
 .\Debug\ctsim.obj
@@ -28,7 +28,7 @@ comctl32.lib winmm.lib rpcrt4.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib w
 \wx2\lib\wxd.lib
 \wx2\lib\xpmd.lib
 ]
-Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP13E1.tmp"
+Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP140B.tmp"
 <h3>Output Window</h3>
 Compiling...
 ctsim.cpp
index 64f7119ef367a7fac84d73df8d55f724f1308f49..e96746c0206840e1fb3ee2c417011b227d9ba516 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ctsim.cpp,v 1.50 2001/01/27 21:40:12 kevin Exp $
+**  $Id: ctsim.cpp,v 1.51 2001/01/27 22:10:11 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -70,7 +70,7 @@
 #endif
 #endif
 
-static const char* rcsindent = "$Id: ctsim.cpp,v 1.50 2001/01/27 21:40:12 kevin Exp $";
+static const char* rcsindent = "$Id: ctsim.cpp,v 1.51 2001/01/27 22:10:11 kevin Exp $";
 
 struct option CTSimApp::ctsimOptions[] = 
 {
@@ -166,13 +166,6 @@ CTSimApp::OnInit()
   if (m_pConfig)
     m_docManager->FileHistoryLoad(*m_pConfig);
 
-#ifdef CTSIM_WINHELP
-  if (! m_pFrame->getWinHelpController().Initialize("ctsim"))
-    ::wxMessageBox ("Cannot initialize the help system", "Error");
-#endif
-  if (! m_pFrame->getHtmlHelpController().Initialize(::wxGetCwd() + "/ctsim"))
-    ::wxMessageBox ("Cannot initialize the help system", "Error");
-
 #ifdef CTSIM_MDI
   TextFileDocument* pLogDoc = newTextDoc();
   if (pLogDoc) {
@@ -191,6 +184,13 @@ CTSimApp::OnInit()
 #endif
   wxLog::SetActiveTarget (new wxLogTextCtrl(m_pLog));
 
+#ifdef CTSIM_WINHELP
+  if (! m_pFrame->getWinHelpController().Initialize("ctsim"))
+    *m_pLog << "Cannot initialize the Windows Help system\n";
+#endif
+  if (! m_pFrame->getHtmlHelpController().Initialize(::wxGetCwd() + "/ctsim"))
+    *m_pLog << "Cannot initialize the HTML Help system";
+
   return true;
 }