Portability updates by Bernie Bright.
This commit is contained in:
parent
8aec98017a
commit
23fbd5919f
@ -37,14 +37,14 @@ logbuf::logbuf()
|
|||||||
logbuf::~logbuf()
|
logbuf::~logbuf()
|
||||||
{
|
{
|
||||||
if ( sbuf )
|
if ( sbuf )
|
||||||
sbuf->sync();
|
sync();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
logbuf::set_sb( streambuf* sb )
|
logbuf::set_sb( streambuf* sb )
|
||||||
{
|
{
|
||||||
if ( sbuf )
|
if ( sbuf )
|
||||||
sbuf->sync();
|
sync();
|
||||||
|
|
||||||
sbuf = sb;
|
sbuf = sb;
|
||||||
}
|
}
|
||||||
@ -63,6 +63,9 @@ logstream::setLogLevels( fgDebugClass c, fgDebugPriority p )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.2 1999/01/19 20:53:34 curt
|
||||||
|
// Portability updates by Bernie Bright.
|
||||||
|
//
|
||||||
// Revision 1.1 1998/11/06 21:20:41 curt
|
// Revision 1.1 1998/11/06 21:20:41 curt
|
||||||
// Initial revision.
|
// Initial revision.
|
||||||
//
|
//
|
||||||
|
@ -33,7 +33,8 @@
|
|||||||
|
|
||||||
#ifdef FG_HAVE_STD_INCLUDES
|
#ifdef FG_HAVE_STD_INCLUDES
|
||||||
# include <streambuf>
|
# include <streambuf>
|
||||||
# include <ostream>
|
# include <iostream>
|
||||||
|
//# include <ostream>
|
||||||
#else
|
#else
|
||||||
# include <iostream.h>
|
# include <iostream.h>
|
||||||
# include "Include/fg_traits.hxx"
|
# include "Include/fg_traits.hxx"
|
||||||
@ -41,6 +42,11 @@
|
|||||||
|
|
||||||
#include "debug_types.h"
|
#include "debug_types.h"
|
||||||
|
|
||||||
|
FG_USING_STD(streambuf);
|
||||||
|
FG_USING_STD(ostream);
|
||||||
|
FG_USING_STD(cerr);
|
||||||
|
FG_USING_STD(endl);
|
||||||
|
|
||||||
//
|
//
|
||||||
// TODO:
|
// TODO:
|
||||||
//
|
//
|
||||||
@ -83,7 +89,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
int sync() { return sbuf->sync(); }
|
inline virtual int sync();
|
||||||
int_type overflow( int ch );
|
int_type overflow( int ch );
|
||||||
// int xsputn( const char* s, istreamsize n );
|
// int xsputn( const char* s, istreamsize n );
|
||||||
|
|
||||||
@ -103,6 +109,16 @@ private:
|
|||||||
void operator= ( const logbuf& );
|
void operator= ( const logbuf& );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
inline int
|
||||||
|
logbuf::sync()
|
||||||
|
{
|
||||||
|
#ifdef FG_HAVE_STD_INCLUDES
|
||||||
|
return sbuf->pubsync();
|
||||||
|
#else
|
||||||
|
return sbuf->sync();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
logbuf::set_log_state( fgDebugClass c, fgDebugPriority p )
|
logbuf::set_log_state( fgDebugClass c, fgDebugPriority p )
|
||||||
{
|
{
|
||||||
@ -195,6 +211,9 @@ fglog()
|
|||||||
#endif // _LOGSTREAM_H
|
#endif // _LOGSTREAM_H
|
||||||
|
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.3 1999/01/19 20:53:35 curt
|
||||||
|
// Portability updates by Bernie Bright.
|
||||||
|
//
|
||||||
// Revision 1.2 1998/11/07 19:07:02 curt
|
// Revision 1.2 1998/11/07 19:07:02 curt
|
||||||
// Enable release builds using the --without-logging option to the configure
|
// Enable release builds using the --without-logging option to the configure
|
||||||
// script. Also a couple log message cleanups, plus some C to C++ comment
|
// script. Also a couple log message cleanups, plus some C to C++ comment
|
||||||
|
Loading…
Reference in New Issue
Block a user