]> git.mxchange.org Git - flightgear.git/blobdiff - src/Input/fgjs.cxx
Merge branch 'topic/gcintersect' into next
[flightgear.git] / src / Input / fgjs.cxx
index e73266a63c18b0fc7b572d65958b87c21c66f67e..81c4cdda0c6fd1e25ad11002325662ddebda2c3e 100644 (file)
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
 #include <simgear/compiler.h>
 
+#if defined( _MSC_VER ) || defined( __MINGW32__ )
+#  include <Winsock2.h>
+#endif
+
 #include <math.h>
 
-#include STL_IOSTREAM
-#include STL_FSTREAM
-#include STL_STRING
+#include <iostream>
+#include <fstream>
+#include <string>
 
-SG_USING_STD(fstream);
-SG_USING_STD(cout);
-SG_USING_STD(cin);
-SG_USING_STD(endl);
-SG_USING_STD(ios);
-SG_USING_STD(string);
+using std::fstream;
+using std::cout;
+using std::cin;
+using std::endl;
+using std::ios;
+using std::string;
 
 #include <simgear/constants.h>
 #include <simgear/debug/logstream.hxx>
 #include <simgear/misc/sg_path.hxx>
 #include <simgear/misc/sgstream.hxx>
 #include <simgear/structure/exception.hxx>
+#include <simgear/props/props_io.hxx>
 
 #include <Main/fg_io.hxx>
 #include <Main/fg_props.hxx>
@@ -72,6 +81,8 @@ int main( int argc, char *argv[] ) {
             cout << "Usage:" << endl;
             cout << "  --help\t\t\tShow this help" << endl;
             exit(0);
+       } else if (strncmp("--fg-root=", argv[i], 10) == 0) {
+           // used later
         } else {
             cout << "Unknown option \"" << argv[i] << "\"" << endl;
             exit(0);
@@ -252,20 +263,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 ) {