From c0f892798de8f89715266150f7d8e413f2cf29fe Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 28 May 2002 18:43:16 +0000 Subject: [PATCH] r2088: *** empty log message *** --- debian/changelog | 4 +++- include/fnetorderstream.h | 14 ++++++++++++-- include/sstream_subst | 3 ++- libctgraphics/ezplot.cpp | 10 +++++----- libctsim/array2dfile.cpp | 7 ++----- libctsim/phantom.cpp | 4 ++-- libctsim/projections.cpp | 4 ++-- libctsupport/plotfile.cpp | 4 ++-- src/docs.h | 4 ++-- src/graph3dview.h | 4 ++-- 10 files changed, 34 insertions(+), 24 deletions(-) diff --git a/debian/changelog b/debian/changelog index 75d9f9c..1b789df 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,11 @@ ctsim (3.5.2-2) unstable; urgency=low * Split online help into ctsim-help package - + * Split pdf and html documentation into ctsim-doc package + * Removed definition of ostringstream class (Closes: #148379) + -- Kevin Rosenberg Tue, 28 May 2002 01:16:28 -0600 ctsim (3.5.2-1) unstable; urgency=low diff --git a/include/fnetorderstream.h b/include/fnetorderstream.h index f58550b..5e1336a 100644 --- a/include/fnetorderstream.h +++ b/include/fnetorderstream.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: fnetorderstream.h,v 1.9 2001/03/13 04:44:25 kevin Exp $ +** $Id: fnetorderstream.h,v 1.10 2002/05/28 18:43:16 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 @@ -115,11 +115,17 @@ SwapBytes8IfLittleEndian (void* buffer) void ConvertNetworkOrder (void* buffer, size_t bytes); void ConvertReverseNetworkOrder (void* buffer, size_t bytes); +#define GPP3 1 using std::fstream; class fnetorderstream : public fstream { public: +#if GPP3 + fnetorderstream (const char* filename, std::ios::openmode mode) + : fstream (filename, mode) {} +#else fnetorderstream (const char* filename, int mode) : fstream (filename, mode) {} +#endif ~fnetorderstream (void) {} @@ -138,9 +144,13 @@ class fnetorderstream : public fstream { class frnetorderstream : public fnetorderstream { public: +#if GPP3 + frnetorderstream (const char* filename, std::ios::openmode mode) + : fnetorderstream (filename, mode) {} +#else frnetorderstream (const char* filename, int mode) : fnetorderstream (filename, mode) {} - +#endif virtual void writeInt16 (kuint16 n); virtual void writeInt32 (kuint32 n); virtual void writeFloat32 (kfloat32 n); diff --git a/include/sstream_subst b/include/sstream_subst index c89ffdc..bb9080a 100644 --- a/include/sstream_subst +++ b/include/sstream_subst @@ -1,7 +1,8 @@ #ifndef __CM_SSTREAM__ #define __CM_SSTREAM__ -#ifndef MSVC +#if 0 +//#ifndef MSVC #include #include diff --git a/libctgraphics/ezplot.cpp b/libctgraphics/ezplot.cpp index cfab1d8..cf98ba4 100644 --- a/libctgraphics/ezplot.cpp +++ b/libctgraphics/ezplot.cpp @@ -6,7 +6,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: ezplot.cpp,v 1.33 2001/03/11 15:27:30 kevin Exp $ +** $Id: ezplot.cpp,v 1.34 2002/05/28 18:43:16 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 @@ -1234,7 +1234,7 @@ loop: */ static inline double -trunc (double x) +my_trunc (double x) { double integer; @@ -1265,7 +1265,7 @@ EZPlot::make_numfmt (char *fmtstr, int *fldwid, int *nfrac, double minval, doubl if (*nfrac < 0) { // calculate frac delta /= pow (10., floor(logt)); // scale delta - frac = static_cast(fabs(trunc(log10(delta)))) + 1; + frac = static_cast(fabs(my_trunc(log10(delta)))) + 1; if (frac < 1) frac = 1; // to be safe, add decimal pt } else // use users' frac @@ -1276,7 +1276,7 @@ EZPlot::make_numfmt (char *fmtstr, int *fldwid, int *nfrac, double minval, doubl ++wid; sprintf (fmtstr, "%s%d%s%d%s", "%", wid, ".", frac, "g"); } else { // use fixed format - wid = static_cast(trunc(logt)) + 1; + wid = static_cast(my_trunc(logt)) + 1; if (wid < 1) wid = 1; if (minval < 0. || maxval < 0.) @@ -1286,7 +1286,7 @@ EZPlot::make_numfmt (char *fmtstr, int *fldwid, int *nfrac, double minval, doubl if (delta >= 0.999999) frac = 1; // add a decimal pt to be safe else - frac = static_cast(fabs(trunc(log10(delta)))) + 1; + frac = static_cast(fabs(my_trunc(log10(delta)))) + 1; } else // use users' frac frac = *nfrac; diff --git a/libctsim/array2dfile.cpp b/libctsim/array2dfile.cpp index bda7925..88e11e1 100644 --- a/libctsim/array2dfile.cpp +++ b/libctsim/array2dfile.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: array2dfile.cpp,v 1.28 2001/01/27 21:02:20 kevin Exp $ +** $Id: array2dfile.cpp,v 1.29 2002/05/28 18:43:16 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 @@ -358,11 +358,8 @@ Array2dFile::fileRead (const char* const filename) { m_filename = filename; -#ifdef MSVC frnetorderstream fs (m_filename.c_str(), std::ios::out | std::ios::in | std::ios::binary); -#else - frnetorderstream fs (m_filename.c_str(), std::ios::out | std::ios::in | std::ios::binary | std::ios::nocreate); -#endif + if (fs.fail()) { sys_error (ERR_WARNING, "Unable to open file %s [fileRead]", m_filename.c_str()); return false; diff --git a/libctsim/phantom.cpp b/libctsim/phantom.cpp index 4d2cc28..8d02d11 100644 --- a/libctsim/phantom.cpp +++ b/libctsim/phantom.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: phantom.cpp,v 1.31 2001/03/24 05:28:28 kevin Exp $ +** $Id: phantom.cpp,v 1.32 2002/05/28 18:43:16 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 @@ -217,7 +217,7 @@ Phantom::createFromFile (const char* const fname) bool Phantom::fileWrite (const char* const fname) { - fstream file (fname, ios::out); + fstream file (fname, std::ios::out); if (! file.fail()) printDefinitions (file); diff --git a/libctsim/projections.cpp b/libctsim/projections.cpp index b2d3c4a..2ca1ce3 100644 --- a/libctsim/projections.cpp +++ b/libctsim/projections.cpp @@ -8,7 +8,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: projections.cpp,v 1.76 2001/09/24 11:29:41 kevin Exp $ +** $Id: projections.cpp,v 1.77 2002/05/28 18:43:16 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 @@ -650,7 +650,7 @@ Projections::read (const char* filename) #ifdef MSVC frnetorderstream fileRead (m_filename.c_str(), std::ios::in | std::ios::binary); #else - frnetorderstream fileRead (m_filename.c_str(), std::ios::in | std::ios::binary | std::ios::nocreate); + frnetorderstream fileRead (m_filename.c_str(), std::ios::in | std::ios::binary); // | std::ios::nocreate); #endif if (fileRead.fail()) diff --git a/libctsupport/plotfile.cpp b/libctsupport/plotfile.cpp index a99bf1d..fb3759d 100644 --- a/libctsupport/plotfile.cpp +++ b/libctsupport/plotfile.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: plotfile.cpp,v 1.13 2001/03/10 23:14:16 kevin Exp $ +** $Id: plotfile.cpp,v 1.14 2002/05/28 18:43:16 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 @@ -191,7 +191,7 @@ PlotFile::fileRead (const char* const filename) #ifdef MSVC fstream fs (m_strFilename.c_str(), std::ios::in); #else - fstream fs (m_strFilename.c_str(), std::ios::in | std::ios::nocreate); + fstream fs (m_strFilename.c_str(), std::ios::in); // | std::ios::nocreate); #endif if (fs.fail()) { diff --git a/src/docs.h b/src/docs.h index e2c7d1f..966cddd 100644 --- a/src/docs.h +++ b/src/docs.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: docs.h,v 1.30 2001/03/11 18:52:03 kevin Exp $ +** $Id: docs.h,v 1.31 2002/05/28 18:43:16 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 @@ -252,7 +252,7 @@ typedef GLfloat glTripleFloat[3]; class Graph3dFileDocument: public wxDocument { - friend Graph3dFileView; + friend class Graph3dFileView; private: DECLARE_DYNAMIC_CLASS(Graph3dFileDocument) diff --git a/src/graph3dview.h b/src/graph3dview.h index 7933f17..90b6d44 100644 --- a/src/graph3dview.h +++ b/src/graph3dview.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: graph3dview.h,v 1.8 2001/03/21 21:45:31 kevin Exp $ +** $Id: graph3dview.h,v 1.9 2002/05/28 18:43:16 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 @@ -39,7 +39,7 @@ class Graph3dFileCanvas; class Graph3dFileView : public wxView { - friend Graph3dFileCanvas; + friend class Graph3dFileCanvas; private: DECLARE_DYNAMIC_CLASS(Graph3dFileView) -- 2.34.1