The next round of MacOS changes contributed by Darrell Walisser.

Starting work on fixing tringle slivers in scenery generation tools.
This commit is contained in:
curt
1999-06-05 12:45:40 +00:00
parent 8f0f79506c
commit d201e9b5c5
5 changed files with 31 additions and 5 deletions

View File

@@ -38,6 +38,13 @@
# include <iostream.h>
#endif
// I don't understand ... <math.h> or <cmath> should be included
// already depending on how you defined FG_HAVE_STD_INCLUDES, but I
// can go ahead and add this -- CLO
#ifdef __MWERKS__
# include <math.h> // needed fabs()
#endif
#include STL_STRING
FG_USING_STD(string);

View File

@@ -48,6 +48,8 @@ FG_USING_STD(endl);
#endif
#ifdef __MWERKS__
# define cerr std::cerr and
# define endl std::endl
FG_USING_STD(iostream);
#endif

View File

@@ -16,6 +16,7 @@
# include <errno.h>
#endif
#include <Debug/logstream.hxx>
#include <Include/fg_constants.h>
#include <Math/fg_geodesy.hxx>
#include <Math/point3d.hxx>
@@ -67,7 +68,7 @@ void fgGeocToGeod( double lat_geoc, double radius, double
// check for domain error
if ( errno == EDOM ) {
cout << "Domain ERROR in fgGeocToGeod!!!!\n";
FG_LOG( FG_GENERAL, FG_ALERT, "Domain ERROR in fgGeocToGeod!!!!" );
*alt = 0.0;
}
@@ -83,7 +84,7 @@ void fgGeocToGeod( double lat_geoc, double radius, double
// check for domain error
if ( errno == EDOM ) {
cout << "Domain ERROR in fgGeocToGeod!!!!\n";
FG_LOG( FG_GENERAL, FG_ALERT, "Domain ERROR in fgGeocToGeod!!!!" );
*sea_level_r = 0.0;
}
}

View File

@@ -45,6 +45,13 @@
# include <math.h>
#endif
// I don't understand ... <math.h> or <cmath> should be included
// already depending on how you defined FG_HAVE_STD_INCLUDES, but I
// can go ahead and add this -- CLO
#ifdef __MWERKS__
# include <math.h> // needed fabs()
#endif
#ifndef FG_HAVE_NATIVE_SGI_COMPILERS
FG_USING_STD(ostream);
FG_USING_STD(istream);

View File

@@ -99,6 +99,14 @@ skipeol( istream& in )
if ( (c == '\n') || (c == '\r') ) {
break;
}
#ifdef __MWERKS__
// also break on '\0'
if ( c == '\0' ) {
break;
}
#endif
}
return in;
@@ -108,13 +116,14 @@ istream&
skipws( istream& in ) {
char c;
while ( in.get(c) ) {
#ifdef __MWERKS__
// -dw- for unix file compatibility
// -clo- this causes problems for unix
#ifdef __MWERKS__
if ( (c == '\n') || (c == '\r') ) {
if ( (c == '\n') || (c == '\r') || (c == '\0') ) {
break;
}
#endif
#endif
if ( ! isspace( c ) ) {
// put pack the non-space character