// 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) {
// 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;
*/
}
-#endif
-
// init ATC menu
fgSetBool("/sim/atc/menu",false);
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 ) {
#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;
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 ) {
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;
// 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 );
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
}
/**
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 );
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;
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;
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;
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 ) {
//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 );
// 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 );
#ifdef SG_HAVE_STD_INCLUDES
# include <cmath>
# include <ctime>
-# ifdef macintosh
- SG_USING_STD(time_t);
-# endif
#else
# include <math.h>
# include <time.h>