]> git.mxchange.org Git - flightgear.git/commitdiff
Remove the remaining macintosh (not MacOS-X) and MWERKS workarounds.
authorehofman <ehofman>
Fri, 25 Jul 2008 07:29:20 +0000 (07:29 +0000)
committerehofman <ehofman>
Fri, 25 Jul 2008 07:29:20 +0000 (07:29 +0000)
src/ATCDCL/commlist.cxx
src/ATCDCL/transmissionlist.cxx
src/Input/fgjs.cxx
src/Main/bootstrap.cxx
src/Main/fg_init.cxx
src/Main/main.cxx
src/Main/options.cxx
src/Navaids/awynet.cxx
src/Navaids/fixlist.cxx
src/Navaids/navdb.cxx
src/Time/sunsolver.cxx

index 4d27e1c794fcde4ccca9f43e182f7306c7a9ee2e..034461d3de43865fb22cad0a7746f84072eaacaa 100644 (file)
@@ -81,13 +81,7 @@ bool FGCommList::LoadComms(const SGPath& path) {
     // read in each line of the file
     fin >> skipcomment;
 
-#ifdef __MWERKS__
-    char c = 0;
-    while ( fin.get(c) && c != '\0' ) {
-        fin.putback(c);
-#else
     while ( !fin.eof() ) {
-#endif
         ATCData a;
                fin >> a;
                if(a.type == INVALID) {
index 1f55609a359b03040a5334be57918b8c24bed4e5..f9e4fe373b09b4c80ca8df8f68689285c91c2085 100644 (file)
@@ -70,20 +70,6 @@ bool FGTransmissionList::init( const SGPath& path ) {
     // in >> skipeol;
     // in >> skipcomment;
 
-#ifdef __MWERKS__
-
-    char c = 0;
-    while ( in.get(c) && c != '\0' ) {
-        in.putback(c);
-        in >> a;
-       if ( a.get_type() != '[' ) {
-           transmissionlist_code[a.get_station()].push_back(a);
-       }
-        in >> skipcomment;
-    }
-
-#else
-
     double min = 100000;
     double max = 0;
 
@@ -107,8 +93,6 @@ bool FGTransmissionList::init( const SGPath& path ) {
         */
     }
  
-#endif
-
     // init ATC menu
     fgSetBool("/sim/atc/menu",false);
 
index 74a89620572eaf715774ec20f8231af6371d9ffb..4d1dc33bb2ee242208275ab81a91d7dac53a1fa1 100644 (file)
@@ -260,20 +260,9 @@ static string fgScanForOption( const string& option, const string& path ) {
     int len = option.length();
 
     in >> skipcomment;
-#ifndef __MWERKS__
     while ( ! in.eof() ) {
-#else
-    char c = '\0';
-    while ( in.get(c) && c != '\0' ) {
-        in.putback(c);
-#endif
         string line;
-
-#if defined( macintosh )
-        getline( in, line, '\r' );
-#else
         getline( in, line, '\n' );
-#endif
 
         // catch extraneous (DOS) line ending character
         if ( line[line.length() - 1] < 32 ) {
index a2d0e6ce5339aeeb39b74701f1d1cf30286dd59c..89354c8f3c2313793b8c53795bc0e4ce44848777 100644 (file)
@@ -54,10 +54,6 @@ SG_USING_STD(endl);
 
 #include "fg_os.hxx"
 
-#ifdef macintosh
-#  include <console.h>         // -dw- for command line dialog
-#endif
-
 char *homedir = ::getenv( "HOME" );
 char *hostname = ::getenv( "HOSTNAME" );
 bool free_hostname = false;
index e52616ab2815f364839ad264ff768200edec559c..be441417b211cec459b853e9fe0f9c3fd6d18084 100644 (file)
@@ -185,20 +185,9 @@ static string fgScanForOption( const string& option, const string& path ) {
     int len = option.length();
 
     in >> skipcomment;
-#ifndef __MWERKS__
     while ( ! in.eof() ) {
-#else
-    char c = '\0';
-    while ( in.get(c) && c != '\0' ) {
-       in.putback(c);
-#endif
        string line;
-
-#if defined( macintosh )
-        getline( in, line, '\r' );
-#else
        getline( in, line, '\n' );
-#endif
 
         // catch extraneous (DOS) line ending character
         if ( line[line.length() - 1] < 32 ) {
index 146bd50fd8ee7c41094cc476546f60b40bdf8288..90d96b4e34d35ed854f08778e38d0ade13f3db47 100644 (file)
@@ -88,11 +88,6 @@ static double real_delta_time_sec = 0.0;
 double delta_time_sec = 0.0;
 extern float init_volume;
 
-
-#ifdef macintosh
-#  include <console.h>         // -dw- for command line dialog
-#endif
-
 // This is a record containing a bit of global housekeeping information
 FGGeneral general;
 
@@ -952,12 +947,6 @@ static void upper_case_property(const char *name)
 // Main top level initialization
 bool fgMainInit( int argc, char **argv ) {
 
-#if defined( macintosh )
-    freopen ("stdout.txt", "w", stdout );
-    freopen ("stderr.txt", "w", stderr );
-    argc = ccommand( &argv );
-#endif
-
     // set default log levels
     sglog().setLogLevels( SG_ALL, SG_ALERT );
 
index 37ba8f6fa242fbc1cfe2e8119480201038f2a139..1cb754340b3b4f9ab8f20891cfa36e147e9f3eaa 100644 (file)
@@ -83,24 +83,13 @@ enum
 static double
 atof( const string& str )
 {
-
-#ifdef __MWERKS__
-    // -dw- if ::atof is called, then we get an infinite loop
-    return std::atof( str.c_str() );
-#else
     return ::atof( str.c_str() );
-#endif
 }
 
 static int
 atoi( const string& str )
 {
-#ifdef __MWERKS__
-    // -dw- if ::atoi is called, then we get an infinite loop
-    return std::atoi( str.c_str() );
-#else
     return ::atoi( str.c_str() );
-#endif
 }
 
 /**
@@ -571,12 +560,8 @@ parse_flightplan(const string& arg)
 
     while ( true ) {
         string line;
-
-#if defined( macintosh )
-        getline( in, line, '\r' );
-#else
         getline( in, line, '\n' );
-#endif
+
         // catch extraneous (DOS) line ending character
         if ( line[line.length() - 1] < 32 )
             line = line.substr( 0, line.length()-1 );
@@ -1646,20 +1631,9 @@ fgParseOptions (const string& path) {
     SG_LOG( SG_GENERAL, SG_INFO, "Processing config file: " << path );
 
     in >> skipcomment;
-#ifndef __MWERKS__
     while ( ! in.eof() ) {
-#else
-    char c = '\0';
-    while ( in.get(c) && c != '\0' ) {
-       in.putback(c);
-#endif
        string line;
-
-#if defined( macintosh )
-        getline( in, line, '\r' );
-#else
        getline( in, line, '\n' );
-#endif
 
         // catch extraneous (DOS) line ending character
         int i;
index 09a96a883a39f1b7043584a97cedb219ac771830..b3bf303fccabf12c41bff072769952bb9b67373a 100755 (executable)
@@ -214,14 +214,7 @@ void FGAirwayNetwork::load(SGPath path)
   in >> skipeol;
 
   // read in each remaining line of the file
-
-#ifdef __MWERKS__
-  char c = 0;
-  while ( in.get(c) && c != '\0' ) {
-    in.putback(c);
-#else
     while ( ! in.eof() ) {
-#endif
       string token;
       in >> token;
 
index 1b87d4ca8e46e76db4554590b4f3e53e2e1a1a76..980949c9a1dfa17bb788d5ec130d769fed97a5b9 100644 (file)
@@ -58,14 +58,7 @@ bool FGFixList::init( SGPath path ) {
     in >> skipeol;
 
     // read in each remaining line of the file
-
-#ifdef __MWERKS__
-    char c = 0;
-    while ( in.get(c) && c != '\0' ) {
-        in.putback(c);
-#else  
     while ( ! in.eof() ) {
-#endif
 
         FGFix fix;
         in >> fix;
index f7a2761f3dc67ee64db562624c91c7990db9d086..8bf2eb8d6dd617e60bc228c7942b548317c2d3dd 100644 (file)
@@ -73,21 +73,7 @@ bool fgNavDBInit( FGAirportList *airports,
     in >> skipeol;
     in >> skipeol;
 
-
-#ifdef __MWERKS__
-
- FIXME -- Please report to the FlightGear mailing list, if you still use a
-          compiler identifying itself as __MWERKS__ that needs this hack.
-          There are 41 instances of it in the SimGear & FilghtGear code,
-          and they are scheduled for removal.
-
-    char c = 0;
-    while ( in.get(c) && c != '\0' ) {
-        in.putback(c);
-#else
     while ( ! in.eof() ) {
-#endif
-
         FGNavRecord *r = new FGNavRecord;
         in >> (*r);
         if ( r->get_type() > 95 ) {
@@ -169,14 +155,7 @@ bool fgNavDBInit( FGAirportList *airports,
     //incarrier >> skipeol;
     //incarrier >> skipeol;
     
-#ifdef __MWERKS__
-    char c = 0;
-    while ( incarrier.get(c) && c != '\0'  ) {
-        incarrier.putback(c);
-#else
     while ( ! incarrier.eof() ) {
-#endif
-        
         FGNavRecord *r = new FGNavRecord;
         incarrier >> (*r);
         carrierlist->add ( r );
@@ -208,15 +187,7 @@ bool fgNavDBInit( FGAirportList *airports,
     
     // skip first line
     inchannel >> skipeol;
-    
-#ifdef __MWERKS__
-    char c = 0;
-    while ( inchannel.get(c) && c != '\0'  ) {
-        in.putback(c);
-#else
     while ( ! inchannel.eof() ) {
-#endif
-
         FGTACANRecord *r = new FGTACANRecord;
         inchannel >> (*r);
         channellist->add ( r );
index 643fbb83a37277d2b89ed9409a971868257fc6a2..2de1905a17abcbea21f637bba39aa658705210a1 100644 (file)
@@ -30,9 +30,6 @@
 #ifdef SG_HAVE_STD_INCLUDES
 #  include <cmath>
 #  include <ctime>
-#  ifdef macintosh
-     SG_USING_STD(time_t);
-#  endif
 #else
 #  include <math.h>
 #  include <time.h>