Fix void * to integer casts for 64-bit Intel systems (STR #1446)

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5499 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2006-09-30 03:34:32 +00:00
parent 4b77e169bf
commit 5e39761d40
5 changed files with 10 additions and 10 deletions

View File

@ -39,7 +39,7 @@ Fl_Cursor cursor = FL_CURSOR_DEFAULT;
Fl_Hor_Value_Slider *cursor_slider;
void choice_cb(Fl_Widget *, void *v) {
cursor = (Fl_Cursor)(int)v;
cursor = (Fl_Cursor)(long)v;
cursor_slider->value(cursor);
fl_cursor(cursor,fg,bg);
}

View File

@ -61,7 +61,7 @@ void button_cb(Fl_Widget *,void *) {
void color_cb(Fl_Widget* button, void* v) {
Fl_Color c;
switch ((int)v) {
switch ((long)v) {
case 0: c = FL_BACKGROUND2_COLOR; break;
case 1: c = FL_SELECTION_COLOR; break;
default: c = FL_FOREGROUND_COLOR; break;

View File

@ -105,11 +105,11 @@ int main(int argc, char** argv) {
for (int i = 0; i < window->children(); i++) {
Fl_Widget* b = window->child(i);
if (b->callback() == (Fl_Callback*)key_cb) {
int i = int(b->user_data());
int i = (long)b->user_data();
if (!i) i = b->label()[0];
((Fl_Button*)b)->value(Fl::event_key(i));
} else if (b->callback() == (Fl_Callback*)shift_cb) {
int i = int(b->user_data());
int i = (long)b->user_data();
((Fl_Button*)b)->value(Fl::event_state(i));
}
}

View File

@ -54,10 +54,10 @@ void test_box::draw() {
buf[3] = char(sliders[7]->value());
buf[4] = 0;
fl_line_style(
(int)(choice[0]->mvalue()->user_data()) +
(int)(choice[1]->mvalue()->user_data()) +
(int)(choice[2]->mvalue()->user_data()),
(int)(sliders[3]->value()),
(long)(choice[0]->mvalue()->user_data()) +
(long)(choice[1]->mvalue()->user_data()) +
(long)(choice[2]->mvalue()->user_data()),
(long)(sliders[3]->value()),
buf);
fl_rect(10,10,w()-20,h()-20);
fl_begin_line();

View File

@ -71,7 +71,7 @@ void box_cb(Fl_Widget* o, void*) {
}
void type_cb(Fl_Widget*, void* v) {
thescroll->type(int(v));
thescroll->type((long)v);
thescroll->redraw();
}
@ -87,7 +87,7 @@ Fl_Menu_Item choices[] = {
};
void align_cb(Fl_Widget*, void* v) {
thescroll->scrollbar.align(int(v));
thescroll->scrollbar.align((long)v);
thescroll->redraw();
}