]> git.mxchange.org Git - simgear.git/commitdiff
More Irix Mips tweaks.
authorcurt <curt>
Wed, 7 Mar 2001 23:56:11 +0000 (23:56 +0000)
committercurt <curt>
Wed, 7 Mar 2001 23:56:11 +0000 (23:56 +0000)
simgear/metar/MetarReport.cpp
simgear/metar/MetarReport.h
simgear/metar/MetarStation.cpp
simgear/metar/MetarStation.h
simgear/misc/zfstream.cxx
simgear/misc/zfstream.hxx
simgear/timing/sg_time.cxx

index 159db338f3386b10575b1f2bae11891164de3534..37b6a433e8fb7b50a55b5e9958ddcef5ba946629 100644 (file)
@@ -7,6 +7,11 @@
 #include "MetarReport.h"
 #include "Metar.h"
 
+#if !defined (FG_HAVE_NATIVE_SGI_COMPILERS)
+FG_USING_STD(endl);
+FG_USING_STD(ostream);
+#endif
+
 CMetarReport::CMetarReport(
    char *s ) :
                m_DecodedReport( 0 )
@@ -230,44 +235,44 @@ int CMetarReport::SnowDepthInches()
 }
 
 
-std::ostream&
+ostream&
 operator << ( ostream& out, CMetarReport& p )
 {
     return out 
        << "StationID " << p.StationID()
        << " WindDirection " << p.WindDirection()
        << " WindSpeed " << p.WindSpeed()
-       << " WindGustSpeed " << p.WindGustSpeed() << std::endl
+       << " WindGustSpeed " << p.WindGustSpeed() << endl
        << "CloudLow " << p.CloudLow()
        << " CloudMedium " << p.CloudMedium()
-       << " CloudHigh " << p.CloudHigh() << std::endl
+       << " CloudHigh " << p.CloudHigh() << endl
        << "TornadicDirection " << p.TornadicDirection()
-       << " TornadicMovementDirection " << p.TornadicMovementDirection() << std::endl
+       << " TornadicMovementDirection " << p.TornadicMovementDirection() << endl
        << "ThunderStormDirection " << p.ThunderStormDirection()
-       << " ThunderStormMovementDirection " << p.ThunderStormMovementDirection() << std::endl
+       << " ThunderStormMovementDirection " << p.ThunderStormMovementDirection() << endl
        << "Virga " << p.Virga()
-       << " VirgaDirection " << p.VirgaDirection() << std::endl
-       << "VolcanicAsh " << p.VolcanicAsh() << std::endl
-       << "Hail " << p.Hail() << std::endl
+       << " VirgaDirection " << p.VirgaDirection() << endl
+       << "VolcanicAsh " << p.VolcanicAsh() << endl
+       << "Hail " << p.Hail() << endl
        << "LightningDirection " << p.LightningDirection()
        << " OccationalLightning " << p.OccationalLightning()
        << " FrequentLightning " << p.FrequentLightning()
-       << " ContinuousLightning " << p.ContinuousLightning() << std::endl
+       << " ContinuousLightning " << p.ContinuousLightning() << endl
        << "CloudToGroundLightning " << p.CloudToGroundLightning()
        << " InterCloudLightning " << p.InterCloudLightning()
        << " CloudToCloudLightning " << p.CloudToCloudLightning()
-       << " CloudToAirLightning " << p.CloudToAirLightning() << std::endl
+       << " CloudToAirLightning " << p.CloudToAirLightning() << endl
        << "DistantLightning " << p.DistantLightning()
        << " AirportLightning " << p.AirportLightning()
        << " VicinityLightning " << p.VicinityLightning()
-       << " OverheadLightning " << p.OverheadLightning() << std::endl
-       << "VerticalVisibility " << p.VerticalVisibility() << std::endl // Meters
+       << " OverheadLightning " << p.OverheadLightning() << endl
+       << "VerticalVisibility " << p.VerticalVisibility() << endl // Meters
        << "Temperature " << p.Temperature() 
-       << " DewpointTemperature " << p.DewpointTemperature() << std::endl
+       << " DewpointTemperature " << p.DewpointTemperature() << endl
        << "Ceiling " << p.Ceiling()
        << " EstimatedCeiling " << p.EstimatedCeiling()
-       << " VariableSkyLayerHeight " << p.VariableSkyLayerHeight() << std::endl
-       << "SnowDepthInches " << p.SnowDepthInches() << std::endl
+       << " VariableSkyLayerHeight " << p.VariableSkyLayerHeight() << endl
+       << "SnowDepthInches " << p.SnowDepthInches() << endl
        ;
 }
 
index 1d7b7857b1dbd27d5ae5baaf79ed1570b4d4c3a9..96a1739a6d8248121033779077d12403a932fdf0 100644 (file)
@@ -117,6 +117,6 @@ private:
                        // Assignment operator.  Not implemented.
 };
 
-std::ostream& operator << ( std::ostream&, CMetarReport& );
+ostream& operator << ( ostream&, CMetarReport& );
 
 #endif
index e068b6b3d07980bfe8ee9fd7b52cf52c50cc5e2c..935c8a8ae1383ef2aa2ffbe25424ff15757673af 100644 (file)
 
 #include <simgear/misc/fgpath.hxx>
 
+#if !defined (FG_HAVE_NATIVE_SGI_COMPILERS)
+FG_USING_STD(ostream);
+FG_USING_STD(cout);
+FG_USING_STD(endl);
+#endif
+
 
 double CMetarStation::decodeDMS( char *b )
 {
@@ -94,28 +100,28 @@ CMetarStation::CMetarStation(
 
 void CMetarStation::dump()
 {
-       std::cout << "ID:" << ID();
-       std::cout << std::endl;
-       std::cout << "number:" << number();
-       std::cout << std::endl;
-       std::cout << "name:" << name();
-       std::cout << std::endl;
-       std::cout << "state:" << state();
-       std::cout << std::endl;
-       std::cout << "country:" << country();
-       std::cout << std::endl;
-       std::cout << "region:" << region();
-       std::cout << std::endl;
-       std::cout << "Location (cart):" << locationCart();
-       std::cout << std::endl;
-       std::cout << "Location (polar):" << locationPolar();
-       std::cout << std::endl;
-       std::cout << "Upper Location (cart):" << upperLocationCart();
-       std::cout << std::endl;
-       std::cout << "Upper Location (polar):" << upperLocationPolar();
-       std::cout << std::endl;
-       std::cout << "P flag:" << pFlag();
-       std::cout << std::endl;
+       cout << "ID:" << ID();
+       cout << endl;
+       cout << "number:" << number();
+       cout << endl;
+       cout << "name:" << name();
+       cout << endl;
+       cout << "state:" << state();
+       cout << endl;
+       cout << "country:" << country();
+       cout << endl;
+       cout << "region:" << region();
+       cout << endl;
+       cout << "Location (cart):" << locationCart();
+       cout << endl;
+       cout << "Location (polar):" << locationPolar();
+       cout << endl;
+       cout << "Upper Location (cart):" << upperLocationCart();
+       cout << endl;
+       cout << "Upper Location (polar):" << upperLocationPolar();
+       cout << endl;
+       cout << "P flag:" << pFlag();
+       cout << endl;
 }
 
 
@@ -135,7 +141,7 @@ CMetarStationDB::CMetarStationDB(const char * dbPath)
     if ( f != NULL ) {
        // Read each line, create an instance of a station, and add it to the vector
        while ( fgets( buf, 256, f) != NULL && feof( f ) == 0 ) {
-           //std::cout << buf << std::endl;
+           // cout << buf << endl;
            m = new CMetarStation( buf );
            //m->dump();
            METAR_Stations[m->ID()]=( m );
@@ -143,10 +149,10 @@ CMetarStationDB::CMetarStationDB(const char * dbPath)
        
        // Close the list
        fclose( f );
-       // std::cout << METAR_Stations.size() << " Metar stations" << std::endl;
+       // cout << METAR_Stations.size() << " Metar stations" << endl;
        
     } else {
-       // std::cout << "Could not open MetarStations file " << std::endl;
+       // cout << "Could not open MetarStations file " << endl;
        
     }
 }
@@ -195,20 +201,20 @@ CMetarStationDB::~CMetarStationDB() {
     }
 }
 
-std::ostream&
+ostream&
 operator << ( ostream& out, const CMetarStation& p )
 {
     return out 
-               << "ID:" << p.m_ID << std::endl
-               << "number:" << p.m_number << std::endl
-               << "name:" << p.m_name << std::endl
-               << "state:" << p.m_state << std::endl
-               << "country:" << p.m_country << std::endl
-               << "region:" << p.m_region << std::endl
-               << "Location (cart):" << p.m_locationCart << std::endl
-               << "Location (polar):" << p.m_locationCart << std::endl
-               << "Upper Location (cart):" << p.m_upperLocationCart << std::endl
-               << "Upper Location (polar):" << p.m_upperLocationPolar << std::endl
-               << "P flag:" << p.m_pFlag << std::endl;
+               << "ID:" << p.m_ID << endl
+               << "number:" << p.m_number << endl
+               << "name:" << p.m_name << endl
+               << "state:" << p.m_state << endl
+               << "country:" << p.m_country << endl
+               << "region:" << p.m_region << endl
+               << "Location (cart):" << p.m_locationCart << endl
+               << "Location (polar):" << p.m_locationCart << endl
+               << "Upper Location (cart):" << p.m_upperLocationCart << endl
+               << "Upper Location (polar):" << p.m_upperLocationPolar << endl
+               << "P flag:" << p.m_pFlag << endl;
 }
 
index 094e72593d888100eed1668dece4a637b03c49b3..72d52f6bcf61839c4ac6ac2b35c8478d4004ac90 100644 (file)
@@ -73,7 +73,7 @@ public:
        char pFlag() { return m_pFlag; }
                        // Get attributes
 
-    friend std::ostream& operator << ( std::ostream&, const CMetarStation& );
+    friend ostream& operator << ( ostream&, const CMetarStation& );
        void dump();
        
 
index 7dcf701f131002cc8bc1114df8dba5d6f7a475d3..7abfa4337ecd3a4aa30b359d79f9215277de88ad 100644 (file)
@@ -116,7 +116,7 @@ gzfilebuf::open( const char *name, ios_openmode io_mode )
     char char_mode[10];
     cvt_iomode( char_mode, io_mode );
     if ( (file = gzopen(name, char_mode)) == NULL ) {
-       perror( "gzfilebuf::open(): " );
+       // perror( "gzfilebuf::open(): " );
        errno = 0;
        return NULL;
     }
index 058c1a1fff439b912e5dcf31f4b147db996cc914..7a319ddd136b7f00a3bec370c4cf9953ee4949f1 100644 (file)
 #  include <simgear/zlib/zlib.h>
 #endif
 
+// At least Irix needs this
+#ifdef FG_HAVE_NATIVE_SGI_COMPILERS
+#include <char_traits.h>
+FG_USING_STD(char_traits);
+#endif
+
 #ifdef FG_HAVE_STD_INCLUDES
 
 #  include <streambuf>
index 6ba31e9a9f704d91e0a2b8b46c23a601b553b973..0e5f17bd5cdaece29edee7726db6bccc8ad00daa 100644 (file)
@@ -28,6 +28,8 @@
 
 #include <simgear/compiler.h>
 
+#include <errno.h>             // for errno
+
 #ifdef FG_HAVE_STD_INCLUDES
 #  include <cmath>
 #  include <cstdio>
@@ -416,7 +418,7 @@ time_t sgTimeGetGMT(int year, int month, int day, int hour, int min, int sec)
     // if this open fails errno is set to 2
     // CYGWIN for one does this
     if ( errno ) {
-       perror( "sgTimeGetGMT()" );
+       perror( "sgTimeGetGMT()" );
        errno = 0;
     }
     return ret;