The attached patch quashes some harmless warnings in FormMaths.

However there is a serious bug: closing the maths dialog
will cause lyx to core dump. I think this must be
the change to use scoped pointer. Angus can you take a look ?

Perhaps it is my bug but I don't think so.

The crash is following the next_-> pointers in BitmapMenu
off into oblivion ...

thanks
john



-- 
"You lose it if you talk about it."
        - Ernest Hemingway
Index: src/frontends/xforms/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/ChangeLog,v
retrieving revision 1.52
diff -u -p -r1.52 ChangeLog
--- src/frontends/xforms/ChangeLog      2001/03/16 12:08:11     1.52
+++ src/frontends/xforms/ChangeLog      2001/03/16 13:33:59
@@ -1,3 +1,7 @@
+2001-03-16  John Levon  <[EMAIL PROTECTED]>
+
+       * FormMaths.C: quash warnings
+
 2001-03-16  Angus Leeming  <[EMAIL PROTECTED]>
 
        * Form_various.h: cleaned up #includes and forward declarations.
Index: src/frontends/xforms/FormMaths.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/FormMaths.C,v
retrieving revision 1.1
diff -u -p -r1.1 FormMaths.C
--- src/frontends/xforms/FormMaths.C    2001/03/16 12:08:12     1.1
+++ src/frontends/xforms/FormMaths.C    2001/03/16 13:33:59
@@ -89,7 +89,7 @@ extern "C" void C_FormMathsButtonCB(FL_O
        FormMaths * form = static_cast<FormMaths*>(ob->form->u_vdata);
        MathsCallbackValues val = static_cast<MathsCallbackValues>(data);
 
-       lyxerr[Debug::GUI] << "Maths button CB val " << val << endl;
+       lyxerr[Debug::GUI] << "Maths button CB val " << long(val) << endl;
 
        switch (val) {
                case MM_GREEK:
@@ -123,6 +123,9 @@ extern "C" void C_FormMathsButtonCB(FL_O
                        form->insertFunction();
                        break;
 
+               case MM_DOTS:
+                       break;
+
                case MM_MAX:
                case MM_CLOSE:
                case MM_APPLY:
@@ -138,7 +141,7 @@ extern "C" void C_FormMathsDelimCB(FL_OB
        FormMaths * form = static_cast<FormMaths*>(ob->form->u_vdata);
        MathsCallbackValues val = static_cast<MathsCallbackValues>(data);
 
-       lyxerr[Debug::GUI] << "Maths delim CB val " << val << endl;
+       lyxerr[Debug::GUI] << "Maths delim CB val " << long(val) << endl;
 
        int left = form->delim_->radio_left->u_ldata;
        int right= form->delim_->radio_right->u_ldata;
@@ -221,7 +224,7 @@ extern "C" void C_FormMathsMatrixCB(FL_O
        FormMaths * form = static_cast<FormMaths*>(ob->form->u_vdata);
        MathsCallbackValues val = static_cast<MathsCallbackValues>(data);
 
-       lyxerr[Debug::GUI] << "Maths matrix CB val " << val << endl;
+       lyxerr[Debug::GUI] << "Maths matrix CB val " << long(val) << endl;
 
        switch (val) {
                case MM_OK:
@@ -262,7 +265,7 @@ extern "C" void C_FormMathsDecoCB(FL_OBJ
        FormMaths * form = static_cast<FormMaths*>(ob->form->u_vdata);
        MathsCallbackValues val = static_cast<MathsCallbackValues>(data);
 
-       lyxerr[Debug::GUI] << "Maths deco CB val " << val << endl;
+       lyxerr[Debug::GUI] << "Maths deco CB val " << long(val) << endl;
 
        int const i = fl_get_bmtable(form->deco_->bmtable_deco);
  
@@ -302,7 +305,7 @@ extern "C" void C_FormMathsSpaceCB(FL_OB
        FormMaths * form = static_cast<FormMaths*>(ob->form->u_vdata);
        MathsCallbackValues val = static_cast<MathsCallbackValues>(data);
 
-       lyxerr[Debug::GUI] << "Maths space CB val " << val << endl;
+       lyxerr[Debug::GUI] << "Maths space CB val " << long(val) << endl;
 
        switch (val) {
                case MM_OK:

Reply via email to