Compare commits
1 Commits
RELEASE_0_
...
RELEASE_0_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
708e745cfd |
@@ -48,7 +48,7 @@ FG_USING_STD(endl);
|
||||
#endif
|
||||
|
||||
#ifdef __MWERKS__
|
||||
# define cerr std::cerr and
|
||||
# define cerr std::cerr
|
||||
# define endl std::endl
|
||||
FG_USING_STD(iostream);
|
||||
#endif
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
// 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()
|
||||
FG_USING_NAMESPACE(std);
|
||||
#endif
|
||||
|
||||
#ifndef FG_HAVE_NATIVE_SGI_COMPILERS
|
||||
@@ -57,11 +57,6 @@ FG_USING_STD(ostream);
|
||||
FG_USING_STD(istream);
|
||||
#endif
|
||||
|
||||
// -dw- someone seems to have forgotten this...
|
||||
#ifdef __MWERKS__
|
||||
FG_USING_STD(std);
|
||||
#endif
|
||||
|
||||
|
||||
const double fgPoint3_Epsilon = 0.0000001;
|
||||
|
||||
|
||||
@@ -93,20 +93,17 @@ fg_gzifstream::attach( int fd, ios_openmode io_mode )
|
||||
istream&
|
||||
skipeol( istream& in )
|
||||
{
|
||||
char c = 0;
|
||||
char c = '\0';
|
||||
// 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') ) {
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef __MWERKS__
|
||||
// also break on '\0'
|
||||
if ( c == '\0' ) {
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
return in;
|
||||
@@ -115,32 +112,21 @@ skipeol( istream& in )
|
||||
istream&
|
||||
skipws( istream& in ) {
|
||||
char c;
|
||||
while ( in.get(c) ) {
|
||||
|
||||
#ifdef __MWERKS__
|
||||
|
||||
// -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;
|
||||
}
|
||||
|
||||
while ( in.get(c) && c != '\0' ) {
|
||||
#else
|
||||
|
||||
if ( ! isspace( c ) ) {
|
||||
// put pack the non-space character
|
||||
in.putback(c);
|
||||
break;
|
||||
}
|
||||
|
||||
while ( in.get(c) ) {
|
||||
#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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user