Triued in vain to fix threads segvs with gcc

Removed wxDebugStream


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-01-02 22:24:41 +00:00
parent 83624f7960
commit d524867f4c
15 changed files with 158 additions and 270 deletions

View File

@@ -562,54 +562,6 @@ wxFindMenuItemId (wxFrame * frame, const wxString& menuString, const wxString& i
return menuBar->FindMenuItem (menuString, itemString);
}
/*
* wxDebugStreamBuf
*/
#if !defined(_WINDLL)
wxDebugStreamBuf::wxDebugStreamBuf(void)
{
// <iostream> usage doesn't need this, and i have no idea how to simulate it.
#if wxUSE_IOSTREAMH
if (allocate())
setp(base(),ebuf());
#endif
}
int wxDebugStreamBuf::overflow(int WXUNUSED(i))
{
int len = pptr() - pbase();
char *txt = new char[len+1];
strncpy(txt, pbase(), len);
txt[len] = '\0';
#ifdef __WXMSW__
OutputDebugString((LPCSTR)txt);
#else
fprintf(stderr, txt);
#endif
setp(pbase(), epptr());
delete[] txt;
return EOF;
}
int wxDebugStreamBuf::sync(void)
{
int len = pptr() - pbase();
char *txt = new char[len+1];
strncpy(txt, pbase(), len);
txt[len] = '\0';
#ifdef __WXMSW__
OutputDebugString((LPCSTR)txt);
#else
fprintf(stderr, txt);
#endif
setp(pbase(), epptr());
delete[] txt;
return 0;
}
#endif
/*
On Fri, 21 Jul 1995, Paul Craven wrote: