contains:

  - fix for the "multiple pastings leads to unshared insets"-bug

  - the "service pack part" of mathed66.diff (i.e. the unapplied part)
      (I basically changed the syntax of the "normalized" version from
       using {} to [] for nesting, so we don't need the 'string map'
       command in lyx2maple anymore. So Tcl8.0 should be enough for 
       toying with 'math extern')
 
  - some ChangeLog entries

Andre'

-- 
Andr� P�nitz ............................................. [EMAIL PROTECTED]
Index: ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/ChangeLog,v
retrieving revision 1.78
diff -u -p -r1.78 ChangeLog
--- ChangeLog   2001/04/25 19:33:52     1.78
+++ ChangeLog   2001/04/27 11:45:08
@@ -1,6 +1,24 @@
+
+2001-04-27 Andr� P�nitz  <[EMAIL PROTECTED]>
+
+       * math_parser.C: fix \frac handling bug introduced on 04-24
+       * math_xiter.C: hotfix for merging "shared" insets
+
+2001-04-25 Andr� P�nitz  <[EMAIL PROTECTED]>
+
+       * math_*.[Ch]: WriteNormal
+       * formula.C: Support for new "math extern" command
+
 2001-04-25  Lars Gullik Bj�nnes  <[EMAIL PROTECTED]>
 
        * math_macrotable.C: include <iostream>
+
+2001-04-24 Andr� P�nitz  <[EMAIL PROTECTED]>
+
+       * math_macro.[Ch]:
+       * math_macrotable.[Ch]:
+       * math_macroarg.[Ch]: restructuring of macro handling
+       * several files: 
 
 2001-04-25  Angus Leeming  <[EMAIL PROTECTED]>
 
Index: array.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/array.C,v
retrieving revision 1.18
diff -u -p -r1.18 array.C
--- array.C     2001/04/24 16:13:38     1.18
+++ array.C     2001/04/27 11:45:08
@@ -96,6 +96,19 @@ void MathedArray::substitute(MathMacro *
                                inset = m->arg(n)->Clone();
                        } else {
                                inset->substitute(m);
+/*                             
+                               if (it.IsActive()) {
+                                       MathParInset * pinset = 
+static_cast<MathParInset *>(inset);
+                                       int n = pinset->getMaxArgumentIdx();
+                                       int idx = pinset->getArgumentIdx();
+                                       for (int i = 0; i <= n; ++i) {
+                                               pinset->setArgumentIdx(i);
+                                               pinset->GetData().substitute(m);
+                                       }
+                                       pinset->setArgumentIdx(idx);
+                               }
+*/
+
                                //lyxerr << "substituting in an ordinary inset\n";
                        }
                        raw_pointer_insert(inset, it.getPos() + 1);
@@ -110,6 +123,22 @@ MathedArray & MathedArray::operator=(Mat
        MathedArray tmp(array);
        swap(tmp);
        return *this;
+}
+
+void MathedArray::push_back(MathedInset * inset, int t)
+{
+       MathedIter it(this);
+       while (it.Next())
+               ;
+       it.insertInset(inset, t);
+}
+
+void MathedArray::push_back(byte b, MathedTextCodes c)
+{
+       MathedIter it(this);
+       while (it.Next())
+               ;
+       it.insert(b, c);
 }
 
 void MathedArray::clear()
Index: array.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/array.h,v
retrieving revision 1.24
diff -u -p -r1.24 array.h
--- array.h     2001/04/25 11:14:01     1.24
+++ array.h     2001/04/27 11:45:08
@@ -20,6 +20,7 @@
 #include <iosfwd>
 
 #include "mathed/support.h"
+#include "math_defs.h"
 
 class MathedInset;
 class MathMacro;
@@ -120,6 +121,10 @@ public:
        void deep_copy();
        ///
        void substitute(MathMacro *);
+       ///
+       void push_back(MathedInset * inset, int t);
+       ///
+       void push_back(byte, MathedTextCodes);
 private:
        /// Buffer
        buffer_type bf_;
Index: lyx2maple
===================================================================
RCS file: lyx2maple
diff -N lyx2maple
--- /dev/null   Tue May  5 22:32:27 1998
+++ lyx2maple   Fri Apr 27 13:45:09 2001
@@ -0,0 +1,59 @@
+#!/usr/bin/tclsh
+
+set lyxish  [lindex $::argv 0]
+set outfile [lindex $::argv 1]
+
+puts "outfile: '$outfile'"
+puts "lyxish: '$lyxish'"
+
+proc binder {vars dats} {
+  foreach var $vars dat $dats {
+    uplevel set $var [list $dat]
+  }
+}
+
+proc macro_mint {arg} {
+       binder {from to what var} $arg
+       return "int($what,$var=$from..$to)"
+}
+
+proc macro {name args} {
+       set cmd macro_$name
+       if {[llength [info commands $cmd]] == 1} {
+               return [$cmd $args]
+       } else {
+               return "$name\($args)"
+       }
+}
+
+
+proc sqrt {arg} {
+       return "sqrt($arg)"
+}
+
+proc frac {num denom} {
+       return "(($num)/($denom))"
+}
+
+proc root {arg radix} {
+       return "(($arg)^(1/($radix))"
+}
+
+proc cdot {} {
+       return "*"
+}
+
+proc par {args} {
+       set args
+}
+
+proc maplize {str} {
+       puts "maplizing: '$str'"
+       set str [subst $str]
+       puts "maplizing res: '$str'"
+       set str
+}
+
+file delete $outfile
+exec echo "latex([maplize $lyxish]); quit;" | maple -q > $outfile
+
Index: math_accentinset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_accentinset.C,v
retrieving revision 1.7
diff -u -p -r1.7 math_accentinset.C
--- math_accentinset.C  2001/04/25 15:43:56     1.7
+++ math_accentinset.C  2001/04/27 11:45:09
@@ -115,24 +115,25 @@ void MathAccentInset::Write(ostream & os
                os << '}';
 }
 
+
 void MathAccentInset::WriteNormal(ostream & os)
 {
        latexkeys const * l = lm_get_key_by_id(code, LM_TK_ACCENT);
-       os << "{accent " << l->name << " ";
+       os << "[accent " << l->name << " ";
 
        if (inset) {
                inset->WriteNormal(os);
        } else {
                if (fn>= LM_TC_RM && fn <= LM_TC_TEXTRM) {
-                       os << "{font " << math_font_name[fn - LM_TC_RM] << "}";
+                       os << "[font " << math_font_name[fn - LM_TC_RM] << "]";
                }
                if (MathIsSymbol(fn)) {
                        latexkeys const * l = lm_get_key_by_id(c, LM_TK_SYM);
                        if (l) 
-                               os << "{symbol " << l->name << "}";
+                               os << "[symbol " << l->name << "] ";
                } else
-                       os << "{char " << char(c) << "}";
+                       os << "[char " << char(c) << "] ";
        }
 
-       os << "} ";
+       os << "] ";
 }
Index: math_bigopinset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_bigopinset.C,v
retrieving revision 1.5
diff -u -p -r1.5 math_bigopinset.C
--- math_bigopinset.C   2001/04/25 15:43:56     1.5
+++ math_bigopinset.C   2001/04/27 11:45:09
@@ -19,8 +19,7 @@ MathedInset * MathBigopInset::Clone()
 }
 
 
-void
-MathBigopInset::draw(Painter & pain, int x, int y)
+void MathBigopInset::draw(Painter & pain, int x, int y)
 {
        string s;
        short t;
@@ -63,7 +62,7 @@ void MathBigopInset::WriteNormal(ostream
 {
        bool const limp = GetLimits();
        
-       os << "{bigop " << name;
+       os << "[bigop " << name;
        
        if (limp && !(sym_ != LM_int && sym_ != LM_oint
                      && (GetStyle() == LM_ST_DISPLAY)))
@@ -73,7 +72,7 @@ void MathBigopInset::WriteNormal(ostream
                              && (GetStyle() == LM_ST_DISPLAY)))
                        os << " nolimits";
        
-       os << "} ";
+       os << "] ";
 }
 
 void MathBigopInset::Metrics()
Index: math_dotsinset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_dotsinset.C,v
retrieving revision 1.6
diff -u -p -r1.6 math_dotsinset.C
--- math_dotsinset.C    2001/04/25 15:43:57     1.6
+++ math_dotsinset.C    2001/04/27 11:45:09
@@ -50,7 +50,8 @@ void MathDotsInset::Write(ostream & os, 
        os << '\\' << name << ' ';
 }
 
+
 void MathDotsInset::WriteNormal(ostream & os)
 {
-       os << "{" << name << "} ";
+       os << "[" << name << "] ";
 }
Index: math_fracinset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_fracinset.C,v
retrieving revision 1.11
diff -u -p -r1.11 math_fracinset.C
--- math_fracinset.C    2001/04/25 15:43:57     1.11
+++ math_fracinset.C    2001/04/27 11:45:09
@@ -165,7 +165,12 @@ void MathFracInset::Metrics()
        idx_ = idxp;
 }
 
+MathParInset * MathFracInset::denom() 
+{
+       return &den_;
+}
 
+
 void MathFracInset::Write(ostream & os, bool fragile)
 {
        os << '\\' << name << '{';
@@ -175,11 +180,12 @@ void MathFracInset::Write(ostream & os, 
        os << '}';
 }
 
+
 void MathFracInset::WriteNormal(ostream & os)
 {
-       os << '{' << name << ' ';
+       os << '[' << name << ' ';
        MathParInset::WriteNormal(os);
        os << " ";
        den_.WriteNormal(os);
-       os << "} ";
+       os << "] ";
 }
Index: math_fracinset.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_fracinset.h,v
retrieving revision 1.7
diff -u -p -r1.7 math_fracinset.h
--- math_fracinset.h    2001/04/25 15:43:57     1.7
+++ math_fracinset.h    2001/04/27 11:45:09
@@ -50,6 +50,8 @@ public:
        int getMaxArgumentIdx() const;
        ///
        void  SetStyle(short);
+       ///
+       MathParInset * denom(); 
 private:
        ///
        int idx_;
Index: math_funcinset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_funcinset.C,v
retrieving revision 1.5
diff -u -p -r1.5 math_funcinset.C
--- math_funcinset.C    2001/04/25 15:43:57     1.5
+++ math_funcinset.C    2001/04/27 11:45:09
@@ -47,9 +47,10 @@ void MathFuncInset::Write(std::ostream &
        os << "\\" << name << ' ';
 }
 
+
 void MathFuncInset::WriteNormal(std::ostream & os)
 {
-       os << "{" << name << "} ";
+       os << "[" << name << "] ";
 }
 
 
Index: math_hash.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_hash.C,v
retrieving revision 1.16
diff -u -p -r1.16 math_hash.C
--- math_hash.C 2001/04/25 15:43:57     1.16
+++ math_hash.C 2001/04/27 11:45:09
@@ -1,10 +1,10 @@
-
 #include <config.h>
 
 #include <map>
 
 #include "math_defs.h"
 #include "math_parser.h"
+#include "support/lstrings.h"
 
 namespace {
 
Index: math_macro.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_macro.C,v
retrieving revision 1.53
diff -u -p -r1.53 math_macro.C
--- math_macro.C        2001/04/25 15:43:57     1.53
+++ math_macro.C        2001/04/27 11:45:09
@@ -287,8 +287,10 @@ void MathMacro::Write(ostream & os, bool
 
 void MathMacro::WriteNormal(ostream & os)
 {
-       os << "{macro " << name << " ";
-       for (int i = 0; i < nargs(); ++i) 
+       os << "[macro " << name << " ";
+       for (int i = 0; i < nargs(); ++i) {
                arg(i)->WriteNormal(os);
-       os << "} ";
+               os << ' ';
+       }
+       os << "] ";
 }
Index: math_macroarg.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_macroarg.C,v
retrieving revision 1.7
diff -u -p -r1.7 math_macroarg.C
--- math_macroarg.C     2001/04/25 15:43:57     1.7
+++ math_macroarg.C     2001/04/27 11:45:09
@@ -67,5 +67,5 @@ void MathMacroArgument::Write(std::ostre
 
 void MathMacroArgument::WriteNormal(std::ostream & os)
 {
-       os << "{macroarg " << number_ << "} ";
+       os << "[macroarg " << number_ << "] ";
 }
Index: math_macrotable.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_macrotable.C,v
retrieving revision 1.13
diff -u -p -r1.13 math_macrotable.C
--- math_macrotable.C   2001/04/25 19:33:52     1.13
+++ math_macrotable.C   2001/04/27 11:45:09
@@ -9,7 +9,6 @@
 #include "math_macrotable.h"
 #include "math_macro.h"
 #include "math_macrotemplate.h"
-#include "math_iter.h"
 #include "array.h"
 #include "math_accentinset.h"
 #include "math_deliminset.h"
@@ -85,9 +84,7 @@ void MathMacroTable::builtinMacros()
        // This macro doesn't have arguments
        {
                MathMacroTemplate & m = provideTemplate("notin", 0);
-               MathedIter iter(&m.GetData());
-               iter.insertInset(new MathAccentInset(LM_in, LM_TC_BOPS, LM_not),
-                                LM_TC_INSET);
+               m.push_back(new MathAccentInset(LM_in, LM_TC_BOPS, LM_not), 
+LM_TC_INSET);
        }
 
        // This macro doesn't have arguments
@@ -99,18 +96,14 @@ void MathMacroTable::builtinMacros()
        mathed_parse(m.array, p, 0);
        }
 
-       // These two are only while we are still with LyX 2.x
        {
                MathMacroTemplate & m = provideTemplate("emptyset", 0);
-               MathedIter iter(&m.GetData());
-               iter.insertInset(new MathAccentInset('0', LM_TC_RM, LM_not),
-                                LM_TC_INSET);
+               m.push_back(new MathAccentInset('0', LM_TC_RM, LM_not), LM_TC_INSET);
        }
 
        {
                MathMacroTemplate & m = provideTemplate("perp", 0);
-               MathedIter iter(&m.GetData());
-               iter.insert(LM_bot, LM_TC_BOP);
+               m.GetData().push_back(LM_bot, LM_TC_BOP);
        }
 
        {
@@ -121,70 +114,16 @@ void MathMacroTable::builtinMacros()
        mathed_parse(m.array, p, 0);
        }
 
-       {
-               MathMacroTemplate & m = provideTemplate("binom", 2);
-               istringstream is("\\choose{#1}{#2}");
-               mathed_parser_file(is, 0);
-               MathParInset * p = &m;
-       mathed_parse(m.array, p, 0);
-       }
-
        // binom has two arguments
        {
-               MathMacroTemplate & m = provideTemplate("binom1", 2);
-               MathedIter iter(&m.GetData());
-
-               MathParInset * inset = new MathDelimInset('(', ')');
-               iter.insertInset(inset, LM_TC_ACTIVE_INSET);
-
-               MathedArray array2;
-               MathedIter iter2(&array2);
                MathFracInset * frac = new MathFracInset(LM_OT_ATOP);
-               iter2.insertInset(frac, LM_TC_ACTIVE_INSET);
-               frac->setData(array2);
-
-               MathedArray array3;
-               MathedIter iter3(&array3);
-               iter3.insertInset(new MathMacroArgument(1), LM_TC_INSET);
+               frac->push_back(new MathMacroArgument(1), LM_TC_INSET);
+               frac->denom()->push_back(new MathMacroArgument(2), LM_TC_INSET);
 
-               MathedArray array4;
-               MathedIter iter4(&array4);
-               iter4.insertInset(new MathMacroArgument(2), LM_TC_INSET);
-
-               frac->SetData(array3, array4);
-       }
-
-/*    
-       {
-               boost::shared_ptr<MathMacroTemplate> m(new MathMacroTemplate("perp", 
0));
-               addTemplate(m);
-               MathedArray array;
-               MathedIter iter(&array);
-               iter.insert(LM_bot, LM_TC_BOP);
-               m->setData(array);
-       }
-
-       // binom has two arguments
-       {
-               boost::shared_ptr<MathMacroTemplate> m(new MathMacroTemplate("binom", 
2));
-               addTemplate(m);
-               MathedArray array;
-               m->setData(array);
-               MathedIter iter(&array);
                MathParInset * inset = new MathDelimInset('(', ')');
-               iter.insertInset(inset, LM_TC_ACTIVE_INSET);
-               array = MathedArray();
-               MathedIter iter2(&array);
-               MathFracInset * frac = new MathFracInset(LM_OT_ATOP);
-               iter2.insertInset(frac, LM_TC_ACTIVE_INSET);
-               inset->setData(array);
-               array = MathedArray();
-               MathedArray array2;
-               MathedIter iter3(&array);
-               iter3.insertInset(m->getMacroPar(0), LM_TC_INSET);
-               MathedIter iter4(&array2);
-               iter4.insertInset(m->getMacroPar(1), LM_TC_INSET);
-               frac->SetData(array, array2);
+               inset->push_back(frac, LM_TC_ACTIVE_INSET);
+
+               MathMacroTemplate & m = provideTemplate("binom", 2);
+               m.push_back(inset, LM_TC_ACTIVE_INSET);
        }
-*/
 }
Index: math_parinset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_parinset.C,v
retrieving revision 1.18
diff -u -p -r1.18 math_parinset.C
--- math_parinset.C     2001/04/25 15:43:57     1.18
+++ math_parinset.C     2001/04/27 11:45:09
@@ -411,11 +411,11 @@ void MathParInset::Write(ostream & os, b
 void MathParInset::WriteNormal(ostream & os)
 {
        if (array.empty()) {
-               os << "{}";
+               os << "[par] ";
                return;
        }
 
-       os << "{par ";
+       os << "[par ";
 
        int brace = 0;
        latexkeys const * l;
@@ -435,7 +435,7 @@ void MathParInset::WriteNormal(ostream &
                        string str = data.GetString();
                        
                        if (data.fcode() >= LM_TC_RM && data.fcode() <= LM_TC_TEXTRM) {
-                               os << "{font " << 
math_font_name[data.fcode()-LM_TC_RM] << '{';
+                               os << "[font " << 
+math_font_name[data.fcode()-LM_TC_RM] << " [";
                        }
                        for (string::const_iterator s = str.begin();
                             s != str.end(); ++s) {
@@ -444,7 +444,7 @@ void MathParInset::WriteNormal(ostream &
                                        l = lm_get_key_by_id(c, (data.fcode() == 
LM_TC_BSYM) ?
                                                             LM_TK_BIGSYM : LM_TK_SYM);
                                        if (l) {
-                                               os << '{' << l->name << '}';
+                                               os << " [" << l->name << "] ";
                                        } else {
 #ifdef WITH_WARNINGS
 #warning this does not compile on gcc 2.97
@@ -456,7 +456,7 @@ void MathParInset::WriteNormal(ostream &
                                        // Is there a standard logical XOR?
                                        if ((data.fcode() == LM_TC_TEX && c != '{' && 
c != '}') ||
                                            (data.fcode() == LM_TC_SPECIAL))
-                                               os << '{';
+                                               os << "[";
                                        else {
                                                if (c == '{')
                                                        ++brace;
@@ -471,29 +471,29 @@ void MathParInset::WriteNormal(ostream &
                                }
                        }
                        if (data.fcode()>= LM_TC_RM && data.fcode()<= LM_TC_TEXTRM)
-                               os << "} ";
+                               os << "] ";
                } else {
                        if (MathIsInset(cx)) {
                                MathedInset * p = data.GetInset();
                                if (cx == LM_TC_UP)
-                                       os << "{superscript ";
+                                       os << "[superscript ";
                                if (cx == LM_TC_DOWN)
-                                       os << "{subscript ";
+                                       os << "[subscript ";
                                p->WriteNormal(os);
                                if (cx == LM_TC_UP || cx == LM_TC_DOWN)
-                                       os << "} ";
+                                       os << "] ";
                                data.Next();
                        } else {
                                switch (cx) {
                                case LM_TC_TAB:
                                {
-                                       os << "} {";
+                                       os << "] [";
                                        data.Next();
                                        break;
                                }
                                case LM_TC_CR:
                                {
-                                       os << "}} ";
+                                       os << "] ] ";
                                        data.Next();
                                        break;
                                }
@@ -508,7 +508,7 @@ void MathParInset::WriteNormal(ostream &
        if (brace > 0)
                os << string(brace, '}');
 
-       os << "} ";
+       os << "] ";
 }
 
 
@@ -561,6 +561,11 @@ bool MathParInset::Permit(short f) const
 MathedArray & MathParInset::GetData()
 {
        return array;
+}
+
+void MathParInset::push_back(MathedInset * inset, int t)
+{
+       array.push_back(inset, t);
 }
 
 
Index: math_parinset.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_parinset.h,v
retrieving revision 1.15
diff -u -p -r1.15 math_parinset.h
--- math_parinset.h     2001/04/25 15:43:57     1.15
+++ math_parinset.h     2001/04/27 11:45:09
@@ -42,6 +42,8 @@ public: 
        virtual MathedArray & GetData();
        ///
        virtual MathedArray const & GetData() const;
+       ///
+       //virtual MathedArray & GetData(int i);
        /// Paragraph position
        virtual void GetXY(int &, int &) const;
        ///
@@ -82,6 +84,8 @@ public: 
        void clear();
        ///
        string label() const;
+       ///
+       void push_back(MathedInset *, int);
 //protected:
        /// Paragraph data is stored here
        MathedArray array;
Index: math_parser.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_parser.C,v
retrieving revision 1.50
diff -u -p -r1.50 math_parser.C
--- math_parser.C       2001/04/25 15:43:57     1.50
+++ math_parser.C       2001/04/27 11:45:09
@@ -141,7 +141,6 @@ istream * yyis;
 bool yy_mtextmode= false;
 
 
-inline
 void mathPrintError(string const & msg) 
 {
        lyxerr << "Line ~" << yylineno << ": Math parse error: " << msg << endl;
@@ -346,7 +345,6 @@ int yylex(void)
 }
 
 
-inline
 int parse_align(char * hor, char *)
 {
        int nc = 0;
@@ -359,7 +357,6 @@ int parse_align(char * hor, char *)
 int accent = 0;
 int nestaccent[8];
 
-inline
 void setAccent(int ac)
 {
        if (ac > 0 && accent < 8)
@@ -409,6 +406,18 @@ void do_insert(MathedIter & it, MathedIn
                it.insertInset(m, t);
 }
 
+
+void handle_frac(MathedIter & it, MathParInset * & par, MathedInsetTypes t) 
+{
+       MathFracInset fc(t);
+       MathedArray num;
+       mathed_parse(num, par, FLAG_BRACE|FLAG_BRACE_LAST);
+       MathedArray den;
+       mathed_parse(den, par, FLAG_BRACE|FLAG_BRACE_LAST);
+       fc.SetData(num, den);
+       it.insertInset(fc.Clone(), LM_TC_ACTIVE_INSET);
+}
+
 } // namespace anon
 
 
@@ -675,19 +684,17 @@ void mathed_parse(MathedArray & array, M
                }
                
                case LM_TK_CHOOSE:
+                       handle_frac(data, par, LM_OT_ATOP);     
+                       break;
+
                case LM_TK_STACK:
+                       handle_frac(data, par, LM_OT_STACKREL); 
+                       break;
+
                case LM_TK_FRAC:
-               {
-                       MathFracInset fc(t);
-                       MathedArray num;
-                       mathed_parse(num, par, FLAG_BRACE|FLAG_BRACE_LAST);
-                       MathedArray den;
-                       mathed_parse(den, par, FLAG_BRACE|FLAG_BRACE_LAST);
-                       fc.SetData(num, den);
-                       data.insertInset(fc.Clone(), LM_TC_ACTIVE_INSET);
+                       handle_frac(data, par, LM_OT_FRAC);     
                        break;
-               }
-               
+
                case LM_TK_SQRT:
                {           
                        char c;
Index: math_root.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_root.C,v
retrieving revision 1.25
diff -u -p -r1.25 math_root.C
--- math_root.C 2001/04/25 15:43:57     1.25
+++ math_root.C 2001/04/27 11:45:09
@@ -154,11 +154,12 @@ void MathRootInset::Write(ostream & os, 
        os << '}';
 }
 
+
 void MathRootInset::WriteNormal(ostream & os)
 {
-       os << "{root ";
+       os << "[root ";
        uroot_.WriteNormal(os);  
        os << " ";
        MathParInset::WriteNormal(os);
-       os << "} ";
+       os << "] ";
 }
Index: math_spaceinset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_spaceinset.C,v
retrieving revision 1.5
diff -u -p -r1.5 math_spaceinset.C
--- math_spaceinset.C   2001/04/25 15:43:57     1.5
+++ math_spaceinset.C   2001/04/27 11:45:09
@@ -52,7 +52,7 @@ void MathSpaceInset::Write(ostream & os,
 
 void MathSpaceInset::WriteNormal(ostream & os)
 {
-       os << "{space " << space_ << "} ";
+       os << "[space " << space_ << "] ";
 }
 
 
Index: math_sqrtinset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_sqrtinset.C,v
retrieving revision 1.9
diff -u -p -r1.9 math_sqrtinset.C
--- math_sqrtinset.C    2001/04/25 15:43:57     1.9
+++ math_sqrtinset.C    2001/04/27 11:45:09
@@ -51,9 +51,9 @@ void MathSqrtInset::Write(ostream & os, 
 
 void MathSqrtInset::WriteNormal(ostream & os)
 {
-       os << "{sqrt ";
+       os << "[sqrt ";
        MathParInset::WriteNormal(os); 
-       os << "} ";
+       os << "] ";
 }
 
 
Index: math_xiter.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_xiter.C,v
retrieving revision 1.21
diff -u -p -r1.21 math_xiter.C
--- math_xiter.C        2001/04/24 16:13:38     1.21
+++ math_xiter.C        2001/04/27 11:45:09
@@ -137,8 +137,13 @@ void MathedXIter::Clean(int pos2)
 }
 
 
-void MathedXIter::Merge(MathedArray const & a)
+void MathedXIter::Merge(MathedArray const & arr)
 {
+#ifdef WITH_WARNINGS
+#warning quick and really dirty: make sure that we really own our inset
+#endif
+       MathedArray a = arr;
+
 #if 0
        array->insert(array->begin() + pos,
                      a.begin(), a.end());

Reply via email to