diff --git a/src/ATCDCL/commlist.cxx b/src/ATCDCL/commlist.cxx index 4d27e1c79..034461d3d 100644 --- a/src/ATCDCL/commlist.cxx +++ b/src/ATCDCL/commlist.cxx @@ -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) { diff --git a/src/ATCDCL/transmissionlist.cxx b/src/ATCDCL/transmissionlist.cxx index 1f55609a3..f9e4fe373 100644 --- a/src/ATCDCL/transmissionlist.cxx +++ b/src/ATCDCL/transmissionlist.cxx @@ -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); diff --git a/src/Input/fgjs.cxx b/src/Input/fgjs.cxx index 74a896205..4d1dc33bb 100644 --- a/src/Input/fgjs.cxx +++ b/src/Input/fgjs.cxx @@ -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 ) { diff --git a/src/Main/bootstrap.cxx b/src/Main/bootstrap.cxx index a2d0e6ce5..89354c8f3 100644 --- a/src/Main/bootstrap.cxx +++ b/src/Main/bootstrap.cxx @@ -54,10 +54,6 @@ SG_USING_STD(endl); #include "fg_os.hxx" -#ifdef macintosh -# include // -dw- for command line dialog -#endif - char *homedir = ::getenv( "HOME" ); char *hostname = ::getenv( "HOSTNAME" ); bool free_hostname = false; diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index e52616ab2..be441417b 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -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 ) { diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 146bd50fd..90d96b4e3 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -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 // -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 ); diff --git a/src/Main/options.cxx b/src/Main/options.cxx index 37ba8f6fa..1cb754340 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -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; diff --git a/src/Navaids/awynet.cxx b/src/Navaids/awynet.cxx index 09a96a883..b3bf303fc 100755 --- a/src/Navaids/awynet.cxx +++ b/src/Navaids/awynet.cxx @@ -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; diff --git a/src/Navaids/fixlist.cxx b/src/Navaids/fixlist.cxx index 1b87d4ca8..980949c9a 100644 --- a/src/Navaids/fixlist.cxx +++ b/src/Navaids/fixlist.cxx @@ -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; diff --git a/src/Navaids/navdb.cxx b/src/Navaids/navdb.cxx index f7a2761f3..8bf2eb8d6 100644 --- a/src/Navaids/navdb.cxx +++ b/src/Navaids/navdb.cxx @@ -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 ); diff --git a/src/Time/sunsolver.cxx b/src/Time/sunsolver.cxx index 643fbb83a..2de1905a1 100644 --- a/src/Time/sunsolver.cxx +++ b/src/Time/sunsolver.cxx @@ -30,9 +30,6 @@ #ifdef SG_HAVE_STD_INCLUDES # include # include -# ifdef macintosh - SG_USING_STD(time_t); -# endif #else # include # include