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:
@@ -38,6 +38,13 @@
|
|||||||
# include <iostream.h>
|
# include <iostream.h>
|
||||||
#endif
|
#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
|
#include STL_STRING
|
||||||
|
|
||||||
FG_USING_STD(string);
|
FG_USING_STD(string);
|
||||||
|
|||||||
@@ -48,6 +48,8 @@ FG_USING_STD(endl);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __MWERKS__
|
#ifdef __MWERKS__
|
||||||
|
# define cerr std::cerr and
|
||||||
|
# define endl std::endl
|
||||||
FG_USING_STD(iostream);
|
FG_USING_STD(iostream);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
# include <errno.h>
|
# include <errno.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <Debug/logstream.hxx>
|
||||||
#include <Include/fg_constants.h>
|
#include <Include/fg_constants.h>
|
||||||
#include <Math/fg_geodesy.hxx>
|
#include <Math/fg_geodesy.hxx>
|
||||||
#include <Math/point3d.hxx>
|
#include <Math/point3d.hxx>
|
||||||
@@ -67,7 +68,7 @@ void fgGeocToGeod( double lat_geoc, double radius, double
|
|||||||
|
|
||||||
// check for domain error
|
// check for domain error
|
||||||
if ( errno == EDOM ) {
|
if ( errno == EDOM ) {
|
||||||
cout << "Domain ERROR in fgGeocToGeod!!!!\n";
|
FG_LOG( FG_GENERAL, FG_ALERT, "Domain ERROR in fgGeocToGeod!!!!" );
|
||||||
*alt = 0.0;
|
*alt = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,7 +84,7 @@ void fgGeocToGeod( double lat_geoc, double radius, double
|
|||||||
|
|
||||||
// check for domain error
|
// check for domain error
|
||||||
if ( errno == EDOM ) {
|
if ( errno == EDOM ) {
|
||||||
cout << "Domain ERROR in fgGeocToGeod!!!!\n";
|
FG_LOG( FG_GENERAL, FG_ALERT, "Domain ERROR in fgGeocToGeod!!!!" );
|
||||||
*sea_level_r = 0.0;
|
*sea_level_r = 0.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,6 +45,13 @@
|
|||||||
# include <math.h>
|
# include <math.h>
|
||||||
#endif
|
#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
|
#ifndef FG_HAVE_NATIVE_SGI_COMPILERS
|
||||||
FG_USING_STD(ostream);
|
FG_USING_STD(ostream);
|
||||||
FG_USING_STD(istream);
|
FG_USING_STD(istream);
|
||||||
|
|||||||
+12
-3
@@ -99,6 +99,14 @@ skipeol( istream& in )
|
|||||||
if ( (c == '\n') || (c == '\r') ) {
|
if ( (c == '\n') || (c == '\r') ) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __MWERKS__
|
||||||
|
// also break on '\0'
|
||||||
|
if ( c == '\0' ) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return in;
|
return in;
|
||||||
@@ -108,13 +116,14 @@ istream&
|
|||||||
skipws( istream& in ) {
|
skipws( istream& in ) {
|
||||||
char c;
|
char c;
|
||||||
while ( in.get(c) ) {
|
while ( in.get(c) ) {
|
||||||
|
|
||||||
|
#ifdef __MWERKS__
|
||||||
// -dw- for unix file compatibility
|
// -dw- for unix file compatibility
|
||||||
// -clo- this causes problems for unix
|
// -clo- this causes problems for unix
|
||||||
#ifdef __MWERKS__
|
if ( (c == '\n') || (c == '\r') || (c == '\0') ) {
|
||||||
if ( (c == '\n') || (c == '\r') ) {
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ( ! isspace( c ) ) {
|
if ( ! isspace( c ) ) {
|
||||||
// put pack the non-space character
|
// put pack the non-space character
|
||||||
|
|||||||
Reference in New Issue
Block a user