home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 8
/
CDASC08.ISO
/
VRAC
/
CUJ0993.ZIP
/
1109060B
< prev
next >
Wrap
Text File
|
1993-07-08
|
613b
|
31 lines
// winstrm.cpp
#include "stdhdr.h"
#include "winstrm.h"
winstreambuf::winstreambuf ()
: streambuf (buffer, winstreambuf_buf_size)
{
*buffer = 0;
reset_buffer ();
stream_window = NULL;
}
int winstreambuf::sync ()
{
ASSERT (stream_window != NULL);
stream_window->PutText (pbase (), out_waiting ());
reset_buffer ();
return 0;
}
int winstreambuf::overflow (int nCh = EOF)
{
stream_window->PutText (pbase (), out_waiting ());
if (nCh != EOF)
// Ie nCh caused the overflow and must be output
stream_window->PutText ((char *) &nCh, 1);
reset_buffer ();
return 0;
}