Jindrich Novy wrote:
--- mc-4.6.1a/src/widget.c.fixes        2005-06-06 15:08:52.202559824 +0200
+++ mc-4.6.1a/src/widget.c      2005-06-06 15:08:29.120068896 +0200
@@ -2363,7 +2363,7 @@ buttonbar_set_label_data (Dlg_head *h, i
 void
 buttonbar_set_label (Dlg_head *h, int idx, const char *text, void (*cback) 
(void))
 {
-    buttonbar_set_label_data (h, idx, text, cback, 0);
+    buttonbar_set_label_data (h, idx, text, (buttonbarfn)cback, 0);

I will fix this in a minute, but sadly the _correct_ fix is not as trivial. Here we are converting completely unrelated function pointers, which is quite dangerous in case the function prototypes change or in case we use another compiler. The C standard states this as "undefined behavior".

--- mc-4.6.1a/src/command.c.fixes       2005-05-27 05:35:15.000000000 +0200
+++ mc-4.6.1a/src/command.c     2005-06-06 15:07:38.228805544 +0200
@@ -280,7 +280,7 @@ command_callback (Widget *w, widget_msg_
        /* fall through */
default:
-       return input_callback (cmd, msg, parm);
+       return input_callback (w, msg, parm);

Fixed. That was trivial.

Roland
_______________________________________________
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel

Reply via email to