diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/howto-add_fd-and-popen.cxx | 4 | ||||
| -rw-r--r-- | examples/tree-custom-sort.cxx | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/examples/howto-add_fd-and-popen.cxx b/examples/howto-add_fd-and-popen.cxx index a8247c37f..0131f4018 100644 --- a/examples/howto-add_fd-and-popen.cxx +++ b/examples/howto-add_fd-and-popen.cxx @@ -44,7 +44,9 @@ FILE *G_fp = NULL; // Handler for add_fd() -- called whenever the ping command outputs a new line of data -void HandleFD(int fd, void *data) { +// Note: FL_SOCKET as 1st argument is used to fix a compiler error(!) on Windows 64-bit. +// Unfortunately we need this in FLTK 1.3 - should hopefully be fixed in 1.4 with a better solution. +void HandleFD(FL_SOCKET fd, void *data) { Fl_Multi_Browser *brow = (Fl_Multi_Browser*)data; char s[1024]; if ( fgets(s, 1023, G_fp) == NULL ) { // read the line of data diff --git a/examples/tree-custom-sort.cxx b/examples/tree-custom-sort.cxx index 40571f513..5f14946ee 100644 --- a/examples/tree-custom-sort.cxx +++ b/examples/tree-custom-sort.cxx @@ -29,7 +29,7 @@ Fl_Tree *G_tree = 0; // Resort the tree void MySortCallback(Fl_Widget*, void *data) { - int dir = int(long(data)); // forward or reverse + int dir = int(fl_intptr_t(data)); // forward or reverse Fl_Tree_Item *i = G_tree->root(); // Bubble sort for ( int ax=0; ax<i->children(); ax++ ) { |
