-/*
- The global operator new used for everything apart from getting
- dynamic storage within this function itself.
-*/
-
-// We'll only do malloc and free for the moment: leave the interesting
-// stuff for the wxObject versions.
+// This function is used to output the dump
+void wxDebugContext::OutputDumpLine(const wxChar *szFormat, ...)
+{
+ // a buffer of 2048 bytes should be long enough for a file name
+ // and a class name
+ wxChar buf[2048];
+ int count;
+ va_list argptr;
+ va_start(argptr, szFormat);
+ buf[WXSIZEOF(buf)-1] = wxT('\0');
+
+ // keep 3 bytes for a \r\n\0
+ count = wxVsnprintf(buf, WXSIZEOF(buf)-3, szFormat, argptr);
+
+ if ( count < 0 )
+ count = WXSIZEOF(buf)-3;
+ buf[count]=wxT('\r');
+ buf[count+1]=wxT('\n');
+ buf[count+2]=wxT('\0');
+
+ wxMessageOutputDebug dbgout;
+ dbgout.Printf(buf);
+}