MacOS tweaks contributed by Darrell Walisser.

This commit is contained in:
curt
2000-12-13 21:12:15 +00:00
parent 6776c2e536
commit 9af5f9f094
17 changed files with 35 additions and 33 deletions

View File

@@ -44,7 +44,8 @@
// already depending on how you defined FG_HAVE_STD_INCLUDES, but I
// can go ahead and add this -- CLO
#ifdef __MWERKS__
# include <math.h> // needed fabs()
FG_USING_STD(sprintf);
FG_USING_STD(fabs);
#endif
#include STL_STRING

View File

@@ -49,8 +49,6 @@ FG_USING_STD(endl);
#endif
#ifdef __MWERKS__
# define cerr std::cerr
# define endl std::endl
FG_USING_STD(iostream);
#endif

View File

@@ -25,8 +25,8 @@
#ifndef _JUPITER_HXX_
#define _JUPITER_HXX_
#include "celestialBody.hxx"
#include "star.hxx"
#include <simgear/ephemeris/celestialBody.hxx>
#include <simgear/ephemeris/star.hxx>
class Jupiter : public CelestialBody
{

View File

@@ -25,8 +25,8 @@
#ifndef _MARS_HXX_
#define _MARS_HXX_
#include "celestialBody.hxx"
#include "star.hxx"
#include <simgear/ephemeris/celestialBody.hxx>
#include <simgear/ephemeris/star.hxx>
class Mars : public CelestialBody
{

View File

@@ -25,8 +25,8 @@
#ifndef _NEPTUNE_HXX_
#define _NEPTUNE_HXX_
#include "celestialBody.hxx"
#include "star.hxx"
#include <simgear/ephemeris/celestialBody.hxx>
#include <simgear/ephemeris/star.hxx>
class Neptune : public CelestialBody
{

View File

@@ -25,8 +25,8 @@
#ifndef _SATURN_HXX_
#define _SATURN_HXX_
#include "celestialBody.hxx"
#include "star.hxx"
#include <simgear/ephemeris/celestialBody.hxx>
#include <simgear/ephemeris/star.hxx>
class Saturn : public CelestialBody
{

View File

@@ -25,8 +25,8 @@
#ifndef _URANUS_HXX_
#define _URANUS_HXX_
#include "celestialBody.hxx"
#include "star.hxx"
#include <simgear/ephemeris/celestialBody.hxx>
#include <simgear/ephemeris/star.hxx>
class Uranus : public CelestialBody
{

View File

@@ -25,8 +25,8 @@
#ifndef _VENUS_HXX_
#define _VENUS_HXX_
#include "celestialBody.hxx"
#include "star.hxx"
#include <simgear/ephemeris/celestialBody.hxx>
#include <simgear/ephemeris/star.hxx>
class Venus : public CelestialBody
{

View File

@@ -34,8 +34,7 @@
#include STL_STRING
#include <simgear/math/sg_types.hxx>
#include "iochannel.hxx"
#include <simgear/io/iochannel.hxx>
FG_USING_STD(string);

View File

@@ -46,7 +46,7 @@
# include <math.h>
#endif
#include "localconsts.hxx"
#include <simgear/math/localconsts.hxx>
// I don't understand ... <math.h> or <cmath> should be included
// already depending on how you defined FG_HAVE_STD_INCLUDES, but I

View File

@@ -89,7 +89,7 @@ CMetarStation::CMetarStation(
m_locationCart = sgPolarToCart3d( p );
Point3D up( ulongitude, ulatitude, ualtitude+EQUATORIAL_RADIUS_M );
m_upperLocationPolar = up;
m_upperLocationCart = fgPolarToCart3d( up );
m_upperLocationCart = sgPolarToCart3d( up );
s = t;
m_pFlag = s[0];
}

View File

@@ -3,6 +3,9 @@
# include <config.h>
#endif
#include <string.h> // strcmp()
#include <stdlib.h> // atof() atoi()
#include <simgear/debug/logstream.hxx>
#include <simgear/xml/easyxml.hxx>
@@ -13,12 +16,11 @@
#include <string>
#include <vector>
using std::istream;
using std::ifstream;
using std::ostream;
using std::ofstream;
using std::string;
using std::vector;
FG_USING_STD(ofstream);
FG_USING_STD(ifstream);
FG_USING_STD(string);
FG_USING_STD(vector);
////////////////////////////////////////////////////////////////////////
@@ -265,6 +267,8 @@ getTypeName (SGValue::Type type)
case SGValue::STRING:
return "string";
}
return "unknown"; // avoid a compiler warning
}
@@ -274,7 +278,7 @@ getTypeName (SGValue::Type type)
static void
writeData (ostream &output, const string &data)
{
for (int i = 0; i < data.size(); i++) {
for (int i = 0; i < (int)data.size(); i++) {
switch (data[i]) {
case '&':
output << "&amp;";

View File

@@ -42,7 +42,7 @@
FG_USING_STD(string);
FG_USING_STD(vector);
#include "waypoint.hxx"
#include <simgear/route/waypoint.hxx>
class SGRoute {

View File

@@ -42,9 +42,9 @@ FG_USING_STD(string);
enum SGCloudType {
SG_CLOUD_OVERCAST = 0,
SG_CLOUD_MOSTLY_CLOUDY = 1,
SG_CLOUD_MOSTLY_SUNNY = 2,
SG_CLOUD_CIRRUS = 3,
SG_CLOUD_MOSTLY_CLOUDY,
SG_CLOUD_MOSTLY_SUNNY,
SG_CLOUD_CIRRUS
};

View File

@@ -39,10 +39,8 @@
#include "stars.hxx"
#ifdef _MSC_VER
FG_USING_STD(cout);
FG_USING_STD(endl);
#endif
// Set up star rendering call backs

View File

@@ -304,7 +304,7 @@ static void fgtzset_internal (int always, const char *tz)
/* User specified the empty string; use UTC explicitly. */
tz = "Universal";
#ifdef MACOS
#ifdef macintosh
/* as you well know, mac paths contain leading colon, this code
messes things up.... */
#else

View File

@@ -6,6 +6,8 @@
#include <simgear/compiler.h>
#include <string.h> // strcmp()
#include "easyxml.hxx"
#include "xmlparse.h"