~ubuntu-branches/ubuntu/hardy/fltk1.1/hardy

« back to all changes in this revision

Viewing changes to test/keyboard.cxx

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2004-12-04 12:59:54 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20041204125954-0bnefh426a67cjgl
Tags: 1.1.6-2
test/*.cxx: Apply patch from Andreas Jochens <aj@andaco.de> to fix
bogus pointer->int casts, which GCC 4.0 rightly treats as errors on
64-bit systems.  (Closes: #284168.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
  return 0;
61
61
}
62
62
 
63
 
struct {int n; const char* text;} table[] = {
 
63
struct table_struct {int n; const char* text;} table[] = {
64
64
  {FL_Escape, "FL_Escape"},
65
65
  {FL_BackSpace, "FL_BackSpace"},
66
66
  {FL_Tab, "FL_Tab"},
103
103
    for (int i = 0; i < window->children(); i++) {
104
104
      Fl_Widget* b = window->child(i);
105
105
      if (b->callback() == (Fl_Callback*)key_cb) {
106
 
        int i = int(b->user_data());
 
106
        long i = long(b->user_data());
107
107
        if (!i) i = b->label()[0];
108
108
        ((Fl_Button*)b)->value(Fl::event_key(i));
109
109
      } else if (b->callback() == (Fl_Callback*)shift_cb) {
110
 
        int i = int(b->user_data());
 
110
        long i = long(b->user_data());
111
111
        ((Fl_Button*)b)->value(Fl::event_state(i));
112
112
      }
113
113
    }