diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index 07e96be679..85505be241 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,11 @@ +2006-01-18 Jean-Marc Lasgouttes + + * math_factory.C (initMath): set initialized to true early to + avoid recursive invokation. + + * math_macrotemplate.C (MathMacroTemplate): make sure math + structures are initialized. + 2006-01-11 Jean-Marc Lasgouttes * math_nestinset.C (doDispatch/LFUN_SELFINSERT): when inserting a diff --git a/src/mathed/math_factory.C b/src/mathed/math_factory.C index a009c1a550..e0529ad5e4 100644 --- a/src/mathed/math_factory.C +++ b/src/mathed/math_factory.C @@ -225,9 +225,9 @@ void initMath() { static bool initialized = false; if (!initialized) { + initialized = true; initParser(); initSymbols(); - initialized = true; } } diff --git a/src/mathed/math_macrotemplate.C b/src/mathed/math_macrotemplate.C index d4051c6698..c02ad4c18c 100644 --- a/src/mathed/math_macrotemplate.C +++ b/src/mathed/math_macrotemplate.C @@ -36,13 +36,17 @@ using std::endl; MathMacroTemplate::MathMacroTemplate() : MathNestInset(2), numargs_(0), name_(), type_("newcommand") -{} +{ + initMath(); +} MathMacroTemplate::MathMacroTemplate(string const & nm, int numargs, string const & type, MathArray const & ar1, MathArray const & ar2) : MathNestInset(2), numargs_(numargs), name_(nm), type_(type) { + initMath(); + if (numargs_ > 9) lyxerr << "MathMacroTemplate::MathMacroTemplate: wrong # of arguments: " << numargs_ << std::endl; @@ -54,6 +58,8 @@ MathMacroTemplate::MathMacroTemplate(string const & nm, int numargs, MathMacroTemplate::MathMacroTemplate(std::istream & is) : MathNestInset(2), numargs_(0), name_() { + initMath(); + MathArray ar; mathed_parse_cell(ar, is); if (ar.size() != 1 || !ar[0]->asMacroTemplate()) {