wxMemStruct *wxDebugContext::m_head = NULL;
wxMemStruct *wxDebugContext::m_tail = NULL;
-// ostream *wxDebugContext::m_debugStream = NULL;
-// streambuf *wxDebugContext::m_streamBuf = NULL;
+// wxSTD ostream *wxDebugContext::m_debugStream = NULL;
+// wxSTD streambuf *wxDebugContext::m_streamBuf = NULL;
// Must initialise these in wxEntry, and then delete them just before wxEntry exits
-streambuf *wxDebugContext::m_streamBuf = NULL;
-ostream *wxDebugContext::m_debugStream = NULL;
+wxSTD streambuf *wxDebugContext::m_streamBuf = NULL;
+wxSTD ostream *wxDebugContext::m_debugStream = NULL;
bool wxDebugContext::m_checkPrevious = FALSE;
int wxDebugContext::debugLevel = 1;
wxDebugContext::wxDebugContext(void)
{
// m_streamBuf = new wxDebugStreamBuf;
-// m_debugStream = new ostream(m_streamBuf);
+// m_debugStream = new wxSTD ostream(m_streamBuf);
}
wxDebugContext::~wxDebugContext(void)
* between SetFile and SetStream.
*/
-void wxDebugContext::SetStream(ostream *str, streambuf *buf)
+void wxDebugContext::SetStream(wxSTD ostream *str, wxSTD streambuf *buf)
{
if (m_debugStream)
{
#ifndef __WATCOMC__
if (m_streamBuf)
{
- streambuf* oldBuf = m_streamBuf;
+ wxSTD streambuf* oldBuf = m_streamBuf;
m_streamBuf = NULL;
delete oldBuf;
}
bool wxDebugContext::SetFile(const wxString& file)
{
- ofstream *str = new ofstream(file.mb_str());
+ wxSTD ofstream *str = new wxSTD ofstream(file.mb_str());
if (str->bad())
{
#if 0
#if !defined(_WINDLL)
wxDebugStreamBuf *buf = new wxDebugStreamBuf;
- ostream *stream = new ostream(m_streamBuf);
+ wxSTD ostream *stream = new wxSTD ostream(m_streamBuf);
SetStream(stream, buf);
return TRUE;
#else
{
// Added by Terry Farnham <TJRT@pacbell.net> to replace
// slow GetPadding call.
- int padb;
+ int padb;
- padb = size & m_balignmask;
- if(padb)
- return(size + m_balign - padb);
- else
- return(size);
+ padb = size & m_balignmask;
+ if(padb)
+ return(size + m_balign - padb);
+ else
+ return(size);
// Old (slow) code
#if 0
#endif
}
+#ifdef __WXDEBUG__
struct wxDebugStatsStruct
{
long instanceCount;
st->next = head;
return st;
}
+#endif
bool wxDebugContext::PrintStatistics(bool detailed)
{
return TRUE;
#else
+ (void)detailed;
return FALSE;
#endif
}
}
// Trace: send output to the current debugging stream
-void wxTrace(const wxChar *fmt ...)
+void wxTrace(const wxChar * ...)
{
#if 1
wxFAIL_MSG(wxT("wxTrace is now obsolete. Please use wxDebugXXX instead."));
}
// Trace with level
-void wxTraceLevel(int level, const wxChar *fmt ...)
+void wxTraceLevel(int, const wxChar * ...)
{
#if 1
wxFAIL_MSG(wxT("wxTrace is now obsolete. Please use wxDebugXXX instead."));