MacOS tweaks contributed by Darrell Walisser.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -49,8 +49,6 @@ FG_USING_STD(endl);
|
||||
#endif
|
||||
|
||||
#ifdef __MWERKS__
|
||||
# define cerr std::cerr
|
||||
# define endl std::endl
|
||||
FG_USING_STD(iostream);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
@@ -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 << "&";
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
FG_USING_STD(string);
|
||||
FG_USING_STD(vector);
|
||||
|
||||
#include "waypoint.hxx"
|
||||
#include <simgear/route/waypoint.hxx>
|
||||
|
||||
|
||||
class SGRoute {
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include <string.h> // strcmp()
|
||||
|
||||
#include "easyxml.hxx"
|
||||
#include "xmlparse.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user