]> git.lyx.org Git - lyx.git/blobdiff - src/debug.C
"Inter-word Space"
[lyx.git] / src / debug.C
index 6117f282c208c0d39084e3c2a99bd14e4c6e8a1a..6d086ad231f89a7e01db39cbe1a4599d29a7677a 100644 (file)
@@ -7,18 +7,12 @@
 *
 * ====================================================== */
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
 #include <config.h>
 
 #include "debug.h"
 #include "gettext.h"
 #include "support/lstrings.h"
 
-#include "BoostFormat.h"
-
 #include <iomanip>
 
 using std::ostream;
@@ -103,24 +97,17 @@ Debug::type Debug::value(string const & val)
 }
 
 
-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);
                }
        }
 }
@@ -128,7 +115,7 @@ void Debug::showLevel(ostream & o, Debug::type level)
 
 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';