Starting work on fixing tringle slivers in scenery generation tools.
# 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);
#endif
#ifdef __MWERKS__
+# define cerr std::cerr and
+# define endl std::endl
FG_USING_STD(iostream);
#endif
# include <errno.h>
#endif
+#include <Debug/logstream.hxx>
#include <Include/fg_constants.h>
#include <Math/fg_geodesy.hxx>
#include <Math/point3d.hxx>
// 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;
}
// 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;
}
}
# 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);
if ( (c == '\n') || (c == '\r') ) {
break;
}
+
+#ifdef __MWERKS__
+ // also break on '\0'
+ if ( c == '\0' ) {
+ break;
+ }
+#endif
+
}
return in;
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