From 6b2f7f4e3de33c4c3a0de15d0a70aad4e8dfbdcf Mon Sep 17 00:00:00 2001 From: curt Date: Sat, 7 Aug 1999 18:24:23 +0000 Subject: [PATCH] Mac portability changes. --- src/Main/options.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Main/options.cxx b/src/Main/options.cxx index 48bfe14ae..ce1559939 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -725,13 +725,19 @@ int fgOPTIONS::parse_command_line( int argc, char **argv ) { // Parse config file options int fgOPTIONS::parse_config_file( const string& path ) { fg_gzifstream in( path ); - if ( !in ) + if ( !in.is_open() ) return(FG_OPTIONS_ERROR); FG_LOG( FG_GENERAL, FG_INFO, "Processing config file: " << path ); in >> skipcomment; - while ( !in.eof() ) { +#ifndef __MWERKS__ + while ( ! in.eof() ) { +#else + char c = '\0'; + while ( in.get(c) && c != '\0' ) { + in.putback(c); +#endif string line; #ifdef GETLINE_NEEDS_TERMINATOR