*** empty log message ***

This commit is contained in:
David Rose 2000-11-28 01:46:01 +00:00
parent d6f8bf83c3
commit d2a5221f4a
4 changed files with 15 additions and 8 deletions

View File

@ -10,13 +10,19 @@
// risk infinite recursion. // risk infinite recursion.
#include <assert.h> #include <assert.h>
#if defined(WIN32_VC)
#define WINDOWS_LEAN_AND_MEAN
#include <windows.h>
#undef WINDOWS_LEAN_AND_MEAN
#endif
#ifndef HAVE_STREAMSIZE #ifndef HAVE_STREAMSIZE
// Some compilers--notably SGI--don't define this for us. // Some compilers--notably SGI--don't define this for us.
typedef int streamsize; typedef int streamsize;
#endif #endif
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: MultiplexStreamBuf::Output::wrinte_string // Function: MultiplexStreamBuf::Output::write_string
// Access: Public // Access: Public
// Description: Dumps the indicated string to the appropriate place. // Description: Dumps the indicated string to the appropriate place.
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
@ -29,12 +35,13 @@ write_string(const string &str) {
break; break;
case OT_system_debug: case OT_system_debug:
#ifdef WIN32_VC
OutputDebugString(str.c_str());
#endif
break; break;
} }
} }
static char test[1024];
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: MultiplexStreamBuf::Constructor // Function: MultiplexStreamBuf::Constructor
// Access: Public // Access: Public
@ -43,6 +50,8 @@ static char test[1024];
MultiplexStreamBuf:: MultiplexStreamBuf::
MultiplexStreamBuf() { MultiplexStreamBuf() {
#ifndef WIN32_VC #ifndef WIN32_VC
// These lines, which are essential on Irix and Linux, seem to be
// unnecessary and not understood on Windows.
allocate(); allocate();
setp(base(), ebuf()); setp(base(), ebuf());
#endif #endif

View File

@ -9,7 +9,6 @@
TrueClock *TrueClock::_global_ptr = NULL; TrueClock *TrueClock::_global_ptr = NULL;
#if defined(WIN32_VC) #if defined(WIN32_VC)
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
@ -78,7 +77,6 @@ TrueClock() {
} }
#elif defined(PENV_PS2) #elif defined(PENV_PS2)
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
@ -135,7 +133,7 @@ TrueClock() {
} }
#else #elif !defined(WIN32_VC)
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// //

View File

@ -36,7 +36,7 @@ has_newline() const {
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: LineStreamBuf::write_chars // Function: LineStreamBuf::write_chars
// Access: Public // Access: Private
// Description: An internal function called by sync() and overflow() // Description: An internal function called by sync() and overflow()
// to store one or more characters written to the stream // to store one or more characters written to the stream
// into the memory buffer. // into the memory buffer.

View File

@ -58,6 +58,7 @@ int LineStreamBuf::
sync() { sync() {
streamsize n = pptr() - pbase(); streamsize n = pptr() - pbase();
write_chars(pbase(), n); write_chars(pbase(), n);
pbump(-n); // Reset pptr().
return 0; // EOF to indicate write full. return 0; // EOF to indicate write full.
} }
@ -81,6 +82,5 @@ overflow(int ch) {
write_chars(&c, 1); write_chars(&c, 1);
} }
pbump(-n); // Reset pptr().
return 0; return 0;
} }