]> git.mxchange.org Git - simgear.git/commitdiff
MacOS tweaks contributed by Darrell Walisser.
authorcurt <curt>
Wed, 13 Dec 2000 21:12:15 +0000 (21:12 +0000)
committercurt <curt>
Wed, 13 Dec 2000 21:12:15 +0000 (21:12 +0000)
17 files changed:
simgear/bucket/newbucket.hxx
simgear/debug/logstream.hxx
simgear/ephemeris/jupiter.hxx
simgear/ephemeris/mars.hxx
simgear/ephemeris/neptune.hxx
simgear/ephemeris/saturn.hxx
simgear/ephemeris/uranus.hxx
simgear/ephemeris/venus.hxx
simgear/io/sg_socket.hxx
simgear/math/point3d.hxx
simgear/metar/MetarStation.cpp
simgear/misc/props_io.cxx
simgear/route/route.hxx
simgear/sky/cloud.hxx
simgear/sky/stars.cxx
simgear/timing/lowleveltime.cxx
simgear/xml/easyxml.cxx

index a0a4f036ab6583e5b6a35bad3cfda751b3f039ad..9ae5f6096c88f26d5b455f0b8b282a5ea3bd9ce7 100644 (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
index a4c4464aeb3c30c93a5258b93f7569e69eb95f1b..669ce0456e22fec5f3bae0eca67c8618f45c3ccf 100644 (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
 
index 3e345cc3befde659c732e9fa4ea88fda01e6d7e8..04bf19c0addef1a5e693cad5b7b4196c8577b01c 100644 (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
 {
index 3968a05ad35e4f796a1f4c18837b5de709e152d9..307f3812272db229e9cafe0835d448b17e3929c9 100644 (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
 {
index a31c54683b591654d7713e84966e6285eeab15e9..81f75ff5601474d5c297b9cbc13e963433fcc56e 100644 (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
 {
index 7c78f7d8f9a68267cd3e9ab617c9e9c9ce08dcae..c1731ade0d3237bd99aa0d1f5b3268366543b705 100644 (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
 {
index 675d258d7534a021a34239c0f15b3f592ace4b4c..5932822b4ba7ed10edb99a4ce74a179167a92f0b 100644 (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
 {
index bdc05aba66ef931d166b6dca2193de203c29a873..4f48d0a8e20ab004aa4361342c626d1566878f2d 100644 (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
 {
index 22915a2ae0c8e3faf1caa66f2a59ae479dc56353..0d393f4f1b4e897320f722f5da7c6b09f50e41d8 100644 (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);
 
index 26284a1538d4437814f70ac4878fdae9ee408fbc..6e51b7a5c9e60d97fa25d56f15d76eaaeccea62d 100644 (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
index 927106c030d24ef44ad4808f67b5df09820c2f1f..22d4902711f528bf0c9ccdf4187d18bbbd6a7773 100644 (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];
 }
index ebe0f0f67c3ed9f1a3b2f02565cf0ae479e3139a..d7671bd18cf55d626977e58adb959406e4a20fd3 100644 (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>
 
 #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);
+
 
 \f
 ////////////////////////////////////////////////////////////////////////
@@ -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;";
index 2fe2edc142fbfc61743ac1a177c2aac22472f334..cd241148d054ec93e1dd13cccd2bf1ba61671a8f 100644 (file)
@@ -42,7 +42,7 @@
 FG_USING_STD(string);
 FG_USING_STD(vector);
 
-#include "waypoint.hxx"
+#include <simgear/route/waypoint.hxx>
 
 
 class SGRoute {
index f49807070b8ed5748ba9530d495435f1f0b4a5c4..4d117e143c4154828867c7f457d0882cd26e69ff 100644 (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
 };
 
 
index e9c43c47eac778f0036e117ce769919166732c83..3a72f4a186cb0638d09eccf9edab19ee6d2492a4 100644 (file)
 
 #include "stars.hxx"
 
-#ifdef _MSC_VER
 FG_USING_STD(cout);
 FG_USING_STD(endl);
-#endif 
 
 
 // Set up star rendering call backs
index 4c3d24f27480c6c63307cc58f65f0029faa8244c..ec3cf98844e16c46227a72054376683f497cbf81 100644 (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
index 979d0877bc9573ecdfd8d7942f9ee8c1c2e767ea..83e0735af2d998c9b9e77a683b9dcf52e7c0ee30 100644 (file)
@@ -6,6 +6,8 @@
 
 #include <simgear/compiler.h>
 
+#include <string.h>            // strcmp()
+
 #include "easyxml.hxx"
 #include "xmlparse.h"