From bb882a12397b6f44ac1d168419d6bac4118139ea Mon Sep 17 00:00:00 2001 From: curt Date: Sun, 20 Jun 1999 01:52:31 +0000 Subject: [PATCH] Borland C++ tweaks. MacOS/Metrowerks tweaks. Fix for fgText default constructor. --- Lib/Bucket/newbucket.cxx | 2 ++ Lib/Misc/fgstream.cxx | 15 +++++++++++++-- Lib/XGL/xglUtils.c | 9 ++------- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/Lib/Bucket/newbucket.cxx b/Lib/Bucket/newbucket.cxx index bb6f8bb9..20d980b9 100644 --- a/Lib/Bucket/newbucket.cxx +++ b/Lib/Bucket/newbucket.cxx @@ -28,6 +28,8 @@ #endif +#include + #include #include "newbucket.hxx" diff --git a/Lib/Misc/fgstream.cxx b/Lib/Misc/fgstream.cxx index 3d5a0933..a7203de2 100644 --- a/Lib/Misc/fgstream.cxx +++ b/Lib/Misc/fgstream.cxx @@ -118,18 +118,29 @@ skipws( istream& in ) { 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; - } -#endif + } + + if ( ! isspace( c ) && c != '\n' ) { + // put pack the non-space character + in.putback(c); + break; + } + +#else if ( ! isspace( c ) ) { // put pack the non-space character in.putback(c); break; } + +#endif + } return in; } diff --git a/Lib/XGL/xglUtils.c b/Lib/XGL/xglUtils.c index 56da1652..d781fa23 100644 --- a/Lib/XGL/xglUtils.c +++ b/Lib/XGL/xglUtils.c @@ -7,7 +7,7 @@ #include #include -#if !defined( __CYGWIN__ ) && !defined( __CYGWIN32__ ) +#if !defined( WIN32 ) # if !defined( HAVE_STL_SGI_PORT ) && !defined( __MWERKS__ ) // Avoid malloc with STLport and MSL # include @@ -28,12 +28,7 @@ int xglTraceOn = TRUE ; -#ifndef WIN32 - FILE *xglTraceFd = stdout ; -#else /* WIN32 */ - /* Bail for now, we just want it to compile I guess */ - FILE *xglTraceFd = NULL; -#endif /* WIN32 */ +FILE *xglTraceFd = NULL; struct GLenumLookup { -- 2.39.5