From baba40afccf75bd75d612980fee023ff22c40952 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Mon, 4 Dec 2000 04:15:48 +0000 Subject: [PATCH] r242: *** empty log message *** --- include/array2dfile.h | 4 +- include/ct.h | 5 +-- include/fnetorderstream.h | 32 ++++++++-------- include/imagefile.h | 6 ++- include/sgp.h | 4 +- include/sstream | 4 ++ libctsim/array2dfile.cpp | 5 +-- libctsupport/fnetorderstream.cpp | 64 ++++++++++++++++---------------- 8 files changed, 63 insertions(+), 61 deletions(-) diff --git a/include/array2dfile.h b/include/array2dfile.h index 0b3da84..9af82a7 100644 --- a/include/array2dfile.h +++ b/include/array2dfile.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: array2dfile.h,v 1.7 2000/12/04 03:09:00 kevin Exp $ +** $Id: array2dfile.h,v 1.8 2000/12/04 04:15:48 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 @@ -28,7 +28,7 @@ #ifndef ARRAY2DFILE_H #define ARRAY2DFILE_H -#ifndef WIN32 +#ifndef MSVC #include #endif diff --git a/include/ct.h b/include/ct.h index aa4cbb0..ad04701 100644 --- a/include/ct.h +++ b/include/ct.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ct.h,v 1.39 2000/12/04 03:09:00 kevin Exp $ +** $Id: ct.h,v 1.40 2000/12/04 04:15:48 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 @@ -53,10 +53,7 @@ #include using namespace std; -#ifndef WIN32 #include -#endif - #include #include #include diff --git a/include/fnetorderstream.h b/include/fnetorderstream.h index cf20869..b682105 100644 --- a/include/fnetorderstream.h +++ b/include/fnetorderstream.h @@ -74,15 +74,15 @@ class fnetorderstream : public fstream { ~fnetorderstream (void) {} - virtual writeInt16 (kuint16 n); - virtual writeInt32 (kuint32 n); - virtual writeFloat32 (kfloat32 n); - virtual writeFloat64 (kfloat64 n); + virtual void writeInt16 (kuint16 n); + virtual void writeInt32 (kuint32 n); + virtual void writeFloat32 (kfloat32 n); + virtual void writeFloat64 (kfloat64 n); - virtual readInt16 (kuint16& n); - virtual readInt32 (kuint32& n); - virtual readFloat32 (kfloat32& n); - virtual readFloat64 (kfloat64& n); + virtual void readInt16 (kuint16& n); + virtual void readInt32 (kuint32& n); + virtual void readFloat32 (kfloat32& n); + virtual void readFloat64 (kfloat64& n); }; @@ -91,15 +91,15 @@ class frnetorderstream : public fnetorderstream { frnetorderstream (const char* filename, int mode) : fnetorderstream (filename, mode) {} - writeInt16 (kuint16 n); - writeInt32 (kuint32 n); - writeFloat32 (kfloat32 n); - writeFloat64 (kfloat64 n); + virtual void writeInt16 (kuint16 n); + virtual void writeInt32 (kuint32 n); + virtual void writeFloat32 (kfloat32 n); + virtual void writeFloat64 (kfloat64 n); - readInt16 (kuint16& n); - readInt32 (kuint32& n); - readFloat32 (kfloat32& n); - readFloat64 (kfloat64& n); + virtual void readInt16 (kuint16& n); + virtual void readInt32 (kuint32& n); + virtual void readFloat32 (kfloat32& n); + virtual void readFloat64 (kfloat64& n); }; #endif diff --git a/include/imagefile.h b/include/imagefile.h index a7600dc..6b6b4d5 100644 --- a/include/imagefile.h +++ b/include/imagefile.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: imagefile.h,v 1.18 2000/07/13 07:03:21 kevin Exp $ +** $Id: imagefile.h,v 1.19 2000/12/04 04:15:48 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 @@ -28,9 +28,11 @@ #ifndef IMAGEFILE_H #define IMAGEFILE_H +#ifndef MSVC +#include +#endif #include #include -#include #include #include #include "ctsupport.h" diff --git a/include/sgp.h b/include/sgp.h index fce79a6..4ee4638 100644 --- a/include/sgp.h +++ b/include/sgp.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: sgp.h,v 1.18 2000/09/04 09:06:46 kevin Exp $ +** $Id: sgp.h,v 1.19 2000/12/04 04:15:48 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 @@ -171,7 +171,7 @@ public: MARK_BSQUARE = 9, // big open square MARK_BDIAMOND = 10, // big open diamond }; - static const int MARK_COUNT = 11; + enum { MARK_COUNT = 11, }; static const unsigned char MARKER_BITMAP[MARK_COUNT][5]; SGP (const SGPDriver& driver); diff --git a/include/sstream b/include/sstream index 69d4ee2..c89ffdc 100644 --- a/include/sstream +++ b/include/sstream @@ -1,5 +1,7 @@ #ifndef __CM_SSTREAM__ #define __CM_SSTREAM__ + +#ifndef MSVC #include #include @@ -105,6 +107,8 @@ inline istringstream & getline (istringstream & src_stream, string & str, char s } } // End of namespace std + +#endif #endif diff --git a/libctsim/array2dfile.cpp b/libctsim/array2dfile.cpp index 121f3c8..f918471 100644 --- a/libctsim/array2dfile.cpp +++ b/libctsim/array2dfile.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: array2dfile.cpp,v 1.12 2000/12/04 03:42:00 kevin Exp $ +** $Id: array2dfile.cpp,v 1.13 2000/12/04 04:15:48 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 @@ -27,9 +27,8 @@ #include "array2dfile.h" #include -#ifndef WIN32 #include -#endif + using namespace std; diff --git a/libctsupport/fnetorderstream.cpp b/libctsupport/fnetorderstream.cpp index 569984c..ffa26f0 100644 --- a/libctsupport/fnetorderstream.cpp +++ b/libctsupport/fnetorderstream.cpp @@ -48,133 +48,133 @@ ConvertReverseNetworkOrder (void* buffer, size_t bytes) #endif } -fnetorderstream& fnetorderstream::writeInt16 (kuint16 n) { +void +fnetorderstream::writeInt16 (kuint16 n) { #ifndef WORDS_BIGENDIAN SwapBytes2 (&n); #endif write (reinterpret_cast(&n), 2); - return (*this); } -fnetorderstream& fnetorderstream::writeInt32 (kuint32 n) { +void +fnetorderstream::writeInt32 (kuint32 n) { #ifndef WORDS_BIGENDIAN SwapBytes4(&n); #endif write (reinterpret_cast(&n), 4); - return (*this); } -fnetorderstream& fnetorderstream::writeFloat32 (kfloat32 n) { +void +fnetorderstream::writeFloat32 (kfloat32 n) { #ifndef WORDS_BIGENDIAN SwapBytes4 (&n); #endif write (reinterpret_cast(&n), 4); - return (*this); } -fnetorderstream& fnetorderstream::writeFloat64 (kfloat64 n) { +void +fnetorderstream::writeFloat64 (kfloat64 n) { #ifndef WORDS_BIGENDIAN SwapBytes8 (&n); #endif write (reinterpret_cast(&n), 8); - return (*this); } -fnetorderstream& fnetorderstream::readInt16 (kuint16& n) { +void +fnetorderstream::readInt16 (kuint16& n) { read (reinterpret_cast(&n), 2); #ifndef WORDS_BIGENDIAN SwapBytes2 (&n); #endif - return (*this); } -fnetorderstream& fnetorderstream::readInt32 (kuint32& n) { +void +fnetorderstream::readInt32 (kuint32& n) { read (reinterpret_cast(&n), 4); #ifndef WORDS_BIGENDIAN SwapBytes4 (&n); #endif - return (*this); } -fnetorderstream& fnetorderstream::readFloat32 (kfloat32& n) { +void +fnetorderstream::readFloat32 (kfloat32& n) { read (reinterpret_cast(&n), 4); #ifndef WORDS_BIGENDIAN SwapBytes4 (&n); #endif - return (*this); } -fnetorderstream& fnetorderstream::readFloat64 (kfloat64& n) { +void +fnetorderstream::readFloat64 (kfloat64& n) { read (reinterpret_cast(&n), 8); #ifndef WORDS_BIGENDIAN SwapBytes8 (&n); #endif - return (*this); } -frnetorderstream& frnetorderstream::writeInt16 (kuint16 n) { +void +frnetorderstream::writeInt16 (kuint16 n) { #ifdef WORDS_BIGENDIAN SwapBytes2 (&n); #endif write (reinterpret_cast(&n), 2); - return (*this); } -frnetorderstream& frnetorderstream::writeInt32 (kuint32 n) { +void +frnetorderstream::writeInt32 (kuint32 n) { #ifdef WORDS_BIGENDIAN SwapBytes4(&n); #endif write (reinterpret_cast(&n), 4); - return (*this); } -frnetorderstream& frnetorderstream::writeFloat32 (kfloat32 n) { +void +frnetorderstream::writeFloat32 (kfloat32 n) { #ifdef WORDS_BIGENDIAN SwapBytes4 (&n); #endif write (reinterpret_cast(&n), 4); - return (*this); } -frnetorderstream& frnetorderstream::writeFloat64 (kfloat64 n) { +void +frnetorderstream::writeFloat64 (kfloat64 n) { #ifdef WORDS_BIGENDIAN SwapBytes8 (&n); #endif write (reinterpret_cast(&n), 8); - return (*this); } -frnetorderstream& frnetorderstream::readInt16 (kuint16& n) { +void +frnetorderstream::readInt16 (kuint16& n) { read (reinterpret_cast(&n), 2); #ifdef WORDS_BIGENDIAN SwapBytes2 (&n); #endif - return (*this); } -frnetorderstream& frnetorderstream::readInt32 (kuint32& n) { +void +frnetorderstream::readInt32 (kuint32& n) { read (reinterpret_cast(&n), 4); #ifdef WORDS_BIGENDIAN SwapBytes4 (&n); #endif - return (*this); } -frnetorderstream& frnetorderstream::readFloat32 (kfloat32& n) { +void +frnetorderstream::readFloat32 (kfloat32& n) { read (reinterpret_cast(&n), 4); #ifdef WORDS_BIGENDIAN SwapBytes4 (&n); #endif - return (*this); } -frnetorderstream& frnetorderstream::readFloat64 (kfloat64& n) { +void +frnetorderstream::readFloat64 (kfloat64& n) { read (reinterpret_cast(&n), 8); #ifdef WORDS_BIGENDIAN SwapBytes8 (&n); #endif - return (*this); } -- 2.34.1