projects
/
ctsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r248: msvc changes
[ctsim.git]
/
libctsim
/
projections.cpp
diff --git
a/libctsim/projections.cpp
b/libctsim/projections.cpp
index fb24e0d897bf065d9d348a5b09f827eacf1b8b8d..7de82039d629517652649bf741ede6ae4a5f454b 100644
(file)
--- a/
libctsim/projections.cpp
+++ b/
libctsim/projections.cpp
@@
-8,7
+8,7
@@
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: projections.cpp,v 1.2
5 2000/09/02 05:10:39
kevin Exp $
+** $Id: projections.cpp,v 1.2
8 2000/12/06 01:46:43
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
**
** 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
@@
-25,7
+25,8
@@
******************************************************************************/
#include "ct.h"
******************************************************************************/
#include "ct.h"
-
+
\r
+const kuint16 Projections::m_signature = ('P'*256 + 'J');
\r
/* NAME
* Projections Constructor for projections matrix storage
/* NAME
* Projections Constructor for projections matrix storage
@@
-253,14
+254,15
@@
Projections::headerRead (fnetorderstream& fs)
return false;
}
return false;
}
- char
remarkStorage
[_remarksize+1];
- fs.read (
r
emarkStorage, _remarksize);
+ char
* pszRemarkStorage = new char
[_remarksize+1];
+ fs.read (
pszR
emarkStorage, _remarksize);
if (! fs) {
sys_error (ERR_SEVERE, "Error reading remark, _remarksize = %d", _remarksize);
return false;
}
if (! fs) {
sys_error (ERR_SEVERE, "Error reading remark, _remarksize = %d", _remarksize);
return false;
}
- remarkStorage[_remarksize] = 0;
- m_remark = remarkStorage;
+ pszRemarkStorage[_remarksize] = 0;
+ m_remark = pszRemarkStorage;
+ delete pszRemarkStorage;
\r
off_t _hsizeread = fs.tellg();
if (!fs || _hsizeread != _hsize) {
off_t _hsizeread = fs.tellg();
if (!fs || _hsizeread != _hsize) {
@@
-343,6
+345,7
@@
Projections::write (const char* filename)
return false;
}
return false;
}
+#ifdef HAVE_TIME
time_t t = time(NULL);
tm* lt = localtime(&t);
m_year = lt->tm_year;
time_t t = time(NULL);
tm* lt = localtime(&t);
m_year = lt->tm_year;
@@
-351,6
+354,7
@@
Projections::write (const char* filename)
m_hour = lt->tm_hour;
m_minute = lt->tm_min;
m_second = lt->tm_sec;
m_hour = lt->tm_hour;
m_minute = lt->tm_min;
m_second = lt->tm_sec;
+#endif
if (! headerWrite (fs))
return false;
if (! headerWrite (fs))
return false;