while (!aircraftfile.fail()) {
holding_string.erase();
aircraftfile >> holding_string;
-#ifdef __BORLANDC__
+#if defined(__BORLANDC__) || defined(FG_HAVE_NATIVE_SGI_COMPILERS)
if (holding_string.compare(0, 2, "//") != 0) {
#else
if (holding_string.compare("//",0,2) != 0) {
aircraftfile >> tag;
gpos = aircraftfile.tellg();
aircraftfile >> tag;
- if (tag != "}" ) {
- while (tag != "}") {
+ if ( !(tag == "}") ) {
+ while ( !(tag == "}") ) {
aircraftfile.seekg(gpos);
Coeff[axis][coeff_ctr[axis]] = new FGCoefficient(FDMExec, aircraftfile);
coeff_ctr[axis]++;
{
float Xt, Xw, Yt, Yw, Zt, Zw, Tw;
float IXXt, IYYt, IZZt, IXZt;
+ int t;
// UPDATE TANK CONTENTS
//
for (int e=0; e<numEngines; e++) {
Fshortage = Oshortage = 0.0;
- for (int t=0; t<numTanks; t++) {
+ for (t=0; t<numTanks; t++) {
switch(Engine[e]->GetType()) {
case FGEngine::etRocket:
}
Weight = EmptyWeight;
- for (int t=0; t<numTanks; t++)
+ for (t=0; t<numTanks; t++)
Weight += Tank[t]->GetContents();
Mass = Weight / GRAVITY;
Xt = Yt = Zt = 0;
Xw = Yw = Zw = 0;
- for (int t=0; t<numTanks; t++) {
+ for (t=0; t<numTanks; t++) {
Xt += Tank[t]->GetX()*Tank[t]->GetContents();
Yt += Tank[t]->GetY()*Tank[t]->GetContents();
Zt += Tank[t]->GetZ()*Tank[t]->GetContents();
// Calculate new moments of inertia here
IXXt = IYYt = IZZt = IXZt = 0.0;
- for (int t=0; t<numTanks; t++) {
+ for (t=0; t<numTanks; t++) {
IXXt += ((Tank[t]->GetX()-Xcg)/12.0)*((Tank[t]->GetX() - Xcg)/12.0)*Tank[t]->GetContents()/GRAVITY;
IYYt += ((Tank[t]->GetY()-Ycg)/12.0)*((Tank[t]->GetY() - Ycg)/12.0)*Tank[t]->GetContents()/GRAVITY;
IZZt += ((Tank[t]->GetZ()-Zcg)/12.0)*((Tank[t]->GetZ() - Zcg)/12.0)*Tank[t]->GetContents()/GRAVITY;
DEFINES
*******************************************************************************/
+#ifndef FGFS
using namespace std;
+#endif
/*******************************************************************************
CLASS DECLARATION
#include "FGAuxiliary.h"
#include "FGOutput.h"
+#ifdef FGFS
+#include <Include/compiler.h>
+#include STL_IOSTREAM
+# ifdef FG_HAVE_STD_INCLUDES
+# include <ctime>
+# else
+# include <time.h>
+# endif
+#else
#include <iostream>
#include <ctime>
+#endif
int main(int argc, char** argv)
{
return 0;
}
+#ifndef FGFS
WinMain()
{
}
+#endif
# define STL_FUNCTIONAL <functional>
# define STL_IOMANIP <iomanip.h>
# define STL_IOSTREAM <iostream.h>
+# define STL_FSTREAM <fstream.h>
# define STL_STDEXCEPT <stdexcept>
# define STL_STRING <string>
# define STL_STRSTREAM <strstream.h>
# define STL_FUNCTIONAL <functional>
# define STL_IOMANIP <iomanip>
# define STL_IOSTREAM <iostream>
+# define STL_FSTREAM <fstream>
# define STL_STDEXCEPT <stdexcept>
# define STL_STRING <string>
# define STL_STRSTREAM <strstream>
# define STL_FUNCTIONAL <functional>
# define STL_IOMANIP <iomanip>
# define STL_IOSTREAM <iostream>
+# define STL_FSTREAM <fstream>
# define STL_STDEXCEPT <stdexcept>
# define STL_STRING <string>
# define STL_FUNCTIONAL <functional>
# define STL_IOMANIP <iomanip>
# define STL_IOSTREAM <iostream>
+# define STL_FSTREAM <fstream>
# define STL_STDEXCEPT <stdexcept>
# define STL_STRING <string>
# define STL_STRSTREAM <strstream>
# endif // HAVE_SGI_STL_PORT
# define STL_IOSTREAM <iostream>
+# define STL_FSTREAM <fstream>
# define STL_STRING <string>
# define FG_NO_DEFAULT_TEMPLATE_ARGS
# define FG_NAMESPACES
# define STL_ALGORITHM <algorithm>
# define STL_FUNCTIONAL <functional>
-# define STL_IOMANIP <iomanip>
+# define STL_IOMANIP <iomanip.h>
# define STL_IOSTREAM <iostream.h>
+# define STL_FSTREAM <fstream.h>
# define STL_STDEXCEPT <stdexcept>
# define STL_STRING <string>
# define STL_STRSTREAM <strstream>
#include STL_STRING
+#include <Debug/logstream.hxx>
+#include <Misc/fgstream.hxx>
#include <Include/fg_constants.h>
#include <Include/general.hxx>
#include <Cockpit/cockpit.hxx>
-#include <Debug/logstream.hxx>
#include <FDM/flight.hxx>
-#include <Misc/fgstream.hxx>
#ifdef FG_NETWORK_OLK
# include <Network/network.h>
#endif
#ifndef _GEOCOORD_H_
#define _GEOCOORD_H_
-//#include <stl.h>
+#include <Include/compiler.h>
#include <math.h>
#include <string>
-#include <iostream>
+#include STL_IOSTREAM
//#include <streambuf> // looks like streambuf does not exist on linux.
// But it looks like it isn't used anyways -:)
#include <vector>
-using namespace std;
+FG_USING_NAMESPACE(std);
#include "mymath.h"
#endif
-//#include <Astro/orbits.hxx>
-#include <Astro/solarsystem.hxx>
#include <Debug/logstream.hxx>
+#include <Astro/solarsystem.hxx>
#include <Include/fg_constants.h>
#include <Main/views.hxx>
#include <Math/fg_geodesy.hxx>
#ifndef _MY_MATH_H_
#define _MY_MATH_H__
+
+#include <Include/compiler.h>
+
#include <math.h>
-#include <fstream>
-#include <iomanip>
+#include STL_FSTREAM
+#include STL_IOMANIP
-using namespace std;
+// FG_USING_NAMESPACE(std);
#include <fg_constants.h>
extern const double PiOver180;