MACos fixes.

This commit is contained in:
curt
1999-09-11 14:35:28 +00:00
parent bb882a1239
commit 708e745cfd
3 changed files with 20 additions and 39 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ FG_USING_STD(endl);
#endif #endif
#ifdef __MWERKS__ #ifdef __MWERKS__
# define cerr std::cerr and # define cerr std::cerr
# define endl std::endl # define endl std::endl
FG_USING_STD(iostream); FG_USING_STD(iostream);
#endif #endif
+1 -6
View File
@@ -49,7 +49,7 @@
// already depending on how you defined FG_HAVE_STD_INCLUDES, but I // already depending on how you defined FG_HAVE_STD_INCLUDES, but I
// can go ahead and add this -- CLO // can go ahead and add this -- CLO
#ifdef __MWERKS__ #ifdef __MWERKS__
# include <math.h> // needed fabs() FG_USING_NAMESPACE(std);
#endif #endif
#ifndef FG_HAVE_NATIVE_SGI_COMPILERS #ifndef FG_HAVE_NATIVE_SGI_COMPILERS
@@ -57,11 +57,6 @@ FG_USING_STD(ostream);
FG_USING_STD(istream); FG_USING_STD(istream);
#endif #endif
// -dw- someone seems to have forgotten this...
#ifdef __MWERKS__
FG_USING_STD(std);
#endif
const double fgPoint3_Epsilon = 0.0000001; const double fgPoint3_Epsilon = 0.0000001;
+18 -32
View File
@@ -93,20 +93,17 @@ fg_gzifstream::attach( int fd, ios_openmode io_mode )
istream& istream&
skipeol( istream& in ) skipeol( istream& in )
{ {
char c = 0; char c = '\0';
// skip to end of line. // skip to end of line.
while ( in.get(c) ) {
#ifdef __MWERKS__
while ( in.get(c) && c != '\0' ) {
#else
while ( in.get(c) ) {
#endif
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;
@@ -115,32 +112,21 @@ skipeol( istream& in )
istream& istream&
skipws( istream& in ) { skipws( istream& in ) {
char c; char c;
while ( in.get(c) ) {
#ifdef __MWERKS__ #ifdef __MWERKS__
while ( in.get(c) && c != '\0' ) {
// -dw- for unix file compatibility
// -clo- this causes problems for unix
if ( (c == '\n') || (c == '\r') || (c == '\0') ) {
break;
}
if ( ! isspace( c ) && c != '\n' ) {
// put pack the non-space character
in.putback(c);
break;
}
#else #else
while ( in.get(c) ) {
if ( ! isspace( c ) ) {
// put pack the non-space character
in.putback(c);
break;
}
#endif #endif
#ifdef __MWERKS__
if ( ! isspace( c ) && c != '\n' ) {
#else
if ( ! isspace( c ) ) {
#endif
// put pack the non-space character
in.putback(c);
break;
}
} }
return in; return in;
} }