From 3387c00c9d5593316e5469270c2d066388061822 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Tue, 3 Apr 2007 08:17:45 +0000 Subject: [PATCH] Sync with src/debug.C git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17703 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/client/debug.C | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/client/debug.C b/src/client/debug.C index 0afb657b37..a3e0920e98 100644 --- a/src/client/debug.C +++ b/src/client/debug.C @@ -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(errorTags[i].level) - << setw(10) << errorTags[i].name - << " " << lyx::to_utf8(_(errorTags[i].desc)) << '\n'; + os << setw(10) << static_cast(errorTags[i].level) + << setw(13) << errorTags[i].name + << " " << to_utf8(_(errorTags[i].desc)) << '\n'; os.flush(); } + LyXErr lyxerr; -- 2.39.2