X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInput%2Ffgjs.cxx;h=81c4cdda0c6fd1e25ad11002325662ddebda2c3e;hb=8be4e97f54121260feb292e1fcbe3d072d28c941;hp=7e1bf790d88252f8bcdc586af511c3624ba70207;hpb=46a3200569c4c3df82bc24713d93954ad488f57a;p=flightgear.git diff --git a/src/Input/fgjs.cxx b/src/Input/fgjs.cxx index 7e1bf790d..81c4cdda0 100644 --- a/src/Input/fgjs.cxx +++ b/src/Input/fgjs.cxx @@ -28,24 +28,29 @@ #include +#if defined( _MSC_VER ) || defined( __MINGW32__ ) +# include +#endif + #include -#include STL_IOSTREAM -#include STL_FSTREAM -#include STL_STRING +#include +#include +#include -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 #include #include #include #include +#include #include
#include
@@ -76,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); @@ -256,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 ) {