summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2006-09-30 03:34:32 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2006-09-30 03:34:32 +0000
commit5e39761d40a1f630d6ea1e7e28b47f7ad2a0e2d2 (patch)
tree3944561a3a5c226bbe1a897dd4f124ed3b2fffe4 /test
parent4b77e169bf3f5443e19c980a6d467d51399ccb63 (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/cursor.cxx2
-rw-r--r--test/input.cxx2
-rw-r--r--test/keyboard.cxx4
-rw-r--r--test/line_style.cxx8
-rw-r--r--test/scroll.cxx4
5 files changed, 10 insertions, 10 deletions
diff --git a/test/cursor.cxx b/test/cursor.cxx
index 190cdc157..5b6c4e4b7 100644
--- a/test/cursor.cxx
+++ b/test/cursor.cxx
@@ -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);
}
diff --git a/test/input.cxx b/test/input.cxx
index 784941f90..fd955a7c0 100644
--- a/test/input.cxx
+++ b/test/input.cxx
@@ -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;
diff --git a/test/keyboard.cxx b/test/keyboard.cxx
index 24801f5b2..e345f0c2b 100644
--- a/test/keyboard.cxx
+++ b/test/keyboard.cxx
@@ -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));
}
}
diff --git a/test/line_style.cxx b/test/line_style.cxx
index 2c2d54f7b..1676aa846 100644
--- a/test/line_style.cxx
+++ b/test/line_style.cxx
@@ -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();
diff --git a/test/scroll.cxx b/test/scroll.cxx
index e2e22d792..4329f70cd 100644
--- a/test/scroll.cxx
+++ b/test/scroll.cxx
@@ -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();
}