]> git.lyx.org Git - features.git/commitdiff
Sync with src/debug.C
authorAbdelrazak Younes <younes@lyx.org>
Tue, 3 Apr 2007 08:17:45 +0000 (08:17 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Tue, 3 Apr 2007 08:17:45 +0000 (08:17 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17703 a592a061-630c-0410-9148-cb99ea01b6c8

src/client/debug.C

index 0afb657b37f85149614b312db0eef1f9fed320ac..a3e0920e982cb352507db5b4a8aa9ff928e65592 100644 (file)
@@ -23,9 +23,9 @@
 
 namespace lyx {
 
-using lyx::support::ascii_lowercase;
-using lyx::support::bformat;
-using lyx::support::isStrInt;
+using support::ascii_lowercase;
+using support::bformat;
+using support::isStrInt;
 
 using std::setw;
 using std::string;
@@ -58,8 +58,8 @@ lyx_debug_trait::type lyx_debug_trait::value(string const & val)
        type l = Debug::NONE;
        string v(val);
        while (!v.empty()) {
-               string::size_type st = v.find(',');
-               string tmp(ascii_lowercase(v.substr(0, st)));
+               string::size_type const st = v.find(',');
+               string const tmp(ascii_lowercase(v.substr(0, st)));
                if (tmp.empty())
                        break;
                // Is it a number?
@@ -86,12 +86,10 @@ void lyx_debug_trait::showLevel(ostream & os, lyx_debug_trait::type level)
                if (errorTags[i].level != Debug::ANY
                    && errorTags[i].level != Debug::NONE
                    && errorTags[i].level & level) {
-                       // avoid _(...) re-entrance problem
-                       // FIXME: should we use _() from gettext.h here?
-                       lyx::docstring const s = _(errorTags[i].desc);
-                       os << lyx::to_utf8(bformat(_("Debugging `%1$s' (%2$s)"),
-                                                  lyx::from_utf8(errorTags[i].name), 
-                                                  s))
+                       // avoid to_utf8(_(...)) re-entrance problem
+                       docstring const s = _(errorTags[i].desc);
+                       os << to_utf8(bformat(_("Debugging `%1$s' (%2$s)"),
+                                       from_utf8(errorTags[i].name), s))
                           << '\n';
                }
        }
@@ -102,12 +100,13 @@ void lyx_debug_trait::showLevel(ostream & os, lyx_debug_trait::type level)
 void lyx_debug_trait::showTags(ostream & os)
 {
        for (int i = 0; i < numErrorTags ; ++i)
-               os << setw(7) << static_cast<unsigned int>(errorTags[i].level)
-                  << setw(10) << errorTags[i].name
-                  << "  " << lyx::to_utf8(_(errorTags[i].desc)) << '\n';
+               os << setw(10) << static_cast<unsigned int>(errorTags[i].level)
+                  << setw(13) << errorTags[i].name
+                  << "  " << to_utf8(_(errorTags[i].desc)) << '\n';
        os.flush();
 }
 
+
 LyXErr lyxerr;