summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2014-05-02 06:41:01 +0000
committerManolo Gouy <Manolo>2014-05-02 06:41:01 +0000
commitb6049a3ef4b1fbddb4966e479db9eccdb0e81464 (patch)
treecb263b37421eadda19589f1aab51b5bff917cb12
parent7278f1ac3720de57407c4033c8bb7fa16f261000 (diff)
Fix STR#3039.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10142 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--src/fl_ask.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/fl_ask.cxx b/src/fl_ask.cxx
index e6d8ba194..9bfe8285c 100644
--- a/src/fl_ask.cxx
+++ b/src/fl_ask.cxx
@@ -66,8 +66,8 @@ static char avoidRecursion = 0;
// The first argument (Fl_Widget *) can either be an Fl_Button*
// pointer to one of the buttons or an Fl_Window* pointer to the
// message window (message_form).
-static void button_cb(Fl_Widget *, void *val) {
- ret_val = (int) (fl_intptr_t)val;
+static void button_cb(Fl_Widget *, long val) {
+ ret_val = (int) val;
message_form->hide();
}
@@ -82,7 +82,7 @@ static Fl_Window *makeform() {
Fl_Group::current(0);
// create a new top level window
Fl_Window *w = message_form = new Fl_Window(410,103);
- message_form->callback(button_cb,(void *)0);
+ message_form->callback(button_cb);
// w->clear_border();
// w->box(FL_UP_BOX);
(message = new Fl_Box(60, 25, 340, 20))
@@ -104,11 +104,7 @@ static Fl_Window *makeform() {
else
button[b] = new Fl_Button(x, 70, 90, 23);
button[b]->align(FL_ALIGN_INSIDE|FL_ALIGN_WRAP);
-#if defined (__LP64__)
- button[b]->callback(button_cb,(void *)(long long) b);
-#else
- button[b]->callback(button_cb,(void *)b);
-#endif
+ button[b]->callback(button_cb, b);
}
}
button[0]->shortcut(FL_Escape);