]> git.lyx.org Git - features.git/commitdiff
Kornel's patch for the gettext() re-entrancy problem
authorAndré Pönitz <poenitz@gmx.net>
Fri, 16 May 2003 14:35:15 +0000 (14:35 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Fri, 16 May 2003 14:35:15 +0000 (14:35 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6972 a592a061-630c-0410-9148-cb99ea01b6c8

src/bufferview_funcs.C
src/debug.C

index dde58c3fc98feabef1be24634c35e11e5de491b3..0ef62d3b4850e49628b2d4d5c4266a5cc4e72e65 100644 (file)
@@ -319,7 +319,11 @@ string const currentState(BufferView * bv)
                buffer->params.getLyXTextClass().defaultfont();
        font.reduce(defaultfont);
 
-       state << bformat(_("Font: %1$s"), font.stateText(&buffer->params));
+       // avoid _(...) re-entrance problem
+       string const s = font.stateText(&buffer->params);
+       state << bformat(_("Font: %1$s"), s);
+
+       // state << bformat(_("Font: %1$s"), font.stateText(&buffer->params));
 
        // The paragraph depth
        int depth = text->getDepth();
index 765fbdb6a6b0144b769b64643a376ce900e19355..6d086ad231f89a7e01db39cbe1a4599d29a7677a 100644 (file)
@@ -104,8 +104,10 @@ void Debug::showLevel(ostream & os, Debug::type level)
                if (errorTags[i].level != Debug::ANY
                    && errorTags[i].level != Debug::NONE
                    && errorTags[i].level & level) {
+                       // avoid _(...) re-entrance problem
+                       const string s = _(errorTags[i].desc);
                        os << bformat(_("Debugging `%1$s' (%2$s)"),
-                                       errorTags[i].name, _(errorTags[i].desc));
+                                       errorTags[i].name, s);
                }
        }
 }