#include "wx/ioswrap.h"
+// Obsolete
+#if 0
#if wxUSE_IOSTREAMH
#include <fstream.h>
#else
#include <fstream>
#endif
+#endif
#if !defined(__WATCOMC__) && !(defined(__VMS__) && ( __VMS_VER < 70000000 ) )\
&& !defined( __MWERKS__ ) && !defined(__SALFORDC__)
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;
+// Obsolete
+#if 0
+wxSTD streambuf *wxDebugContext::m_streamBuf = NULL;
+wxSTD ostream *wxDebugContext::m_debugStream = NULL;
+#endif
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)
{
- SetStream(NULL, NULL);
+// SetStream(NULL, NULL);
}
/*
* between SetFile and SetStream.
*/
-void wxDebugContext::SetStream(ostream *str, streambuf *buf)
+// Obsolete
+#if 0
+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
#endif
return FALSE;
}
-
+#endif
+ // 0
/*
Work out the positions of the markers by creating an array of 2 markers
{
// 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
// if (TRUE)
{
- wxChar* appName = wxT("application");
+ wxChar* appName = (wxChar*) wxT("application");
wxString appNameStr("");
if (wxTheApp)
{
#endif
}
+#ifdef __WXDEBUG__
struct wxDebugStatsStruct
{
long instanceCount;
st->next = head;
return st;
}
+#endif
bool wxDebugContext::PrintStatistics(bool detailed)
{
// if (TRUE)
{
- wxChar* appName = wxT("application");
+ wxChar* appName = (wxChar*) wxT("application");
wxString appNameStr(wxT(""));
if (wxTheApp)
{
// if (detailed && (data != (void*)m_debugStream) && (data != (void*) m_streamBuf))
if (detailed && (data != (void*) wxLog::GetActiveTarget()))
{
- wxChar *className = wxT("nonobject");
+ wxChar *className = (wxChar*) wxT("nonobject");
if (st->m_isObject && st->GetActualData())
{
wxObject *obj = (wxObject *)st->GetActualData();
if (obj->GetClassInfo()->GetClassName())
- className = obj->GetClassInfo()->GetClassName();
+ className = (wxChar*)obj->GetClassInfo()->GetClassName();
}
wxDebugStatsStruct *stats = FindStatsStruct(list, className);
if (!stats)
return TRUE;
#else
+ (void)detailed;
return FALSE;
#endif
}
// if (TRUE)
{
- wxChar* appName = wxT("application");
+ wxChar* appName = (wxChar*) wxT("application");
wxString appNameStr(wxT(""));
if (wxTheApp)
{
}
// 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."));