#include "gettext.h"
#include "support/lstrings.h"
-#include "support/BoostFormat.h"
-
#include <iomanip>
using std::ostream;
}
-void Debug::showLevel(ostream & o, Debug::type level)
+void Debug::showLevel(ostream & os, Debug::type level)
{
// Show what features are traced
- for (int i = 0 ; i < numErrorTags ; ++i) {
+ for (int i = 0; i < numErrorTags ; ++i) {
if (errorTags[i].level != Debug::ANY
&& errorTags[i].level != Debug::NONE
&& errorTags[i].level & level) {
-#if USE_BOOST_FORMAT
- o << boost::format(
- _("Debugging `%1$s' (%2$s)"))
- % errorTags[i].name
- % _(errorTags[i].desc)
- << endl;
-#else
- o << _("Debugging `") << errorTags[i].name << "' ("
- << _(errorTags[i].desc) << ')'
- << endl;
-#endif
+ // avoid _(...) re-entrance problem
+ const string s = _(errorTags[i].desc);
+ os << bformat(_("Debugging `%1$s' (%2$s)"),
+ errorTags[i].name, s);
}
}
}
void Debug::showTags(ostream & os)
{
- for (int i = 0 ; i < numErrorTags ; ++i)
+ for (int i = 0; i < numErrorTags ; ++i)
os << setw(7) << errorTags[i].level
<< setw(10) << errorTags[i].name
<< " " << _(errorTags[i].desc) << '\n';