X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7f8fae980f78332671c163002ae9e3316fedf663..e2758e21753c00b8e36f11c003fd6cd0e5137391:/utils/ifacecheck/src/ifacecheck.cpp diff --git a/utils/ifacecheck/src/ifacecheck.cpp b/utils/ifacecheck/src/ifacecheck.cpp index df069501b2..13aca6a97e 100644 --- a/utils/ifacecheck/src/ifacecheck.cpp +++ b/utils/ifacecheck/src/ifacecheck.cpp @@ -75,11 +75,11 @@ class IfaceCheckLog : public wxLog public: IfaceCheckLog() {} - void DoLog(wxLogLevel level, const wxString& msg, time_t stamp) + virtual void DoLogText(const wxString& msg) { - wxPrintf(msg); - wxPrintf("\n"); - Flush(); + // send all messages to stdout (normal behaviour is to sent them to stderr) + wxPuts(msg); + fflush(stdout); } }; @@ -153,16 +153,12 @@ int IfaceCheckApp::OnRun() // in any case set basic std preprocessor #defines: m_doxyInterface.AddPreprocessorValue("NULL", "0"); - //g_bLogEnabled = false; - // parse the two XML files which contain the real and the doxygen interfaces // for wxWidgets API: if (!m_gccInterface.Parse(parser.GetParam(0)) || !m_doxyInterface.Parse(parser.GetParam(1))) return 1; -// g_bLogEnabled = true; - if (parser.Found(DUMP_SWITCH)) { wxLogMessage("Dumping real API to '%s'...", API_DUMP_FILE); @@ -218,7 +214,9 @@ bool IfaceCheckApp::Compare() interfaces.GetCount()); if (!m_strToMatch.IsEmpty()) + { wxLogMessage("Processing only header files matching '%s' expression.", m_strToMatch); + } for (unsigned int i=0; iGetHeader(), &m, &tmp)) + { wxLogMessage("Adjusted attributes of '%s' method", m.GetAsString()); + } proceed = false; break; @@ -393,7 +397,7 @@ int IfaceCheckApp::CompareClasses(const wxClass* iface, const wxClass* api) for (unsigned int j=0; jGetAsString(true, true, true, true); - wxLogWarning(warning); + wxLogWarning("%s", warning); count++; if (overloads.GetCount()>1) @@ -401,7 +405,9 @@ int IfaceCheckApp::CompareClasses(const wxClass* iface, const wxClass* api) // TODO: decide which of these overloads is the most "similar" to m // and eventually modify it if (m_modify) + { wxLogWarning("\tmanual fix is required"); + } } else { @@ -433,6 +439,7 @@ bool IfaceCheckApp::StringContainsMethodName(const wxString& str, const wxMethod bool IfaceCheckApp::FixMethod(const wxString& header, const wxMethod* iface, const wxMethod* api) { + unsigned int i,j; wxASSERT(iface && api); wxTextFile file; @@ -492,7 +499,7 @@ bool IfaceCheckApp::FixMethod(const wxString& header, const wxMethod* iface, con } // remove the old prototype - for (int i=start; i<=end; i++) + for (int k=start; k<=end; k++) file.RemoveLine(start); // remove (end-start)-nth times the start-th line #define INDENTATION_STR wxString(" ") @@ -520,7 +527,7 @@ bool IfaceCheckApp::FixMethod(const wxString& header, const wxMethod* iface, con const wxArgumentTypeArray& realargs = api->GetArgumentTypes(); if (realargs.GetCount() == doxygenargs.GetCount()) { - for (unsigned int j=0; j WRAP_COLUMN) @@ -562,7 +569,7 @@ bool IfaceCheckApp::FixMethod(const wxString& header, const wxMethod* iface, con } // insert the new lines - for (unsigned int i=0; iGetMethodCount(); j++) + for (j=0; j < cToUpdate[i]->GetMethodCount(); j++) { wxMethod& m = cToUpdate[i]->GetMethod(j); if (m.GetLocation() > iface->GetLocation())