]> git.mxchange.org Git - flightgear.git/commitdiff
Mac portability changes.
authorcurt <curt>
Sat, 7 Aug 1999 18:24:23 +0000 (18:24 +0000)
committercurt <curt>
Sat, 7 Aug 1999 18:24:23 +0000 (18:24 +0000)
src/Main/options.cxx

index 48bfe14ae076e3a1037a742c9713701c652a0781..ce1559939e2a266e95bb3cec29911746984ea024 100644 (file)
@@ -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