diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-03-27 17:54:33 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-03-27 17:54:33 +0000 |
commit | fbec0d96c9fbbe830d20b7076282683034181ce5 (patch) | |
tree | 8f5729579f98cfdc1832b28e11466efb8b670303 | |
parent | a6e0dfe80071956f2d6478e92d1db097bcb99e00 (diff) | |
download | netsurf-fbec0d96c9fbbe830d20b7076282683034181ce5.tar.gz netsurf-fbec0d96c9fbbe830d20b7076282683034181ce5.tar.bz2 |
Another wimp_window_state->wimp_open conversion.
Avoid aliasing an int ** and a void **.
svn path=/trunk/netsurf/; revision=6946
-rw-r--r-- | riscos/wimp_event.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/riscos/wimp_event.c b/riscos/wimp_event.c index eb252c8c6..4d14b1f0a 100644 --- a/riscos/wimp_event.c +++ b/riscos/wimp_event.c @@ -36,6 +36,7 @@ #include "riscos/ucstables.h" #include "riscos/wimp.h" #include "riscos/wimp_event.h" +#include "riscos/wimputils.h" #include "utils/log.h" #include "utils/utils.h" @@ -528,7 +529,7 @@ bool ro_gui_wimp_event_mouse_click(wimp_pointer *pointer) pointer->w); ro_gui_menu_closed(false); gui_poll(true); - error = xwimp_open_window((wimp_open *) &open); + error = xwimp_open_window(PTR_WIMP_OPEN(&open)); if (error) { LOG(("xwimp_open_window: 0x%x: %s", error->errnum, error->errmess)); @@ -718,22 +719,25 @@ bool ro_gui_wimp_event_keypress(wimp_key *key) } if (t_alphabet != alphabet) { + void *ostable; osbool unclaimed; /* Alphabet has changed, so read UCS table location */ alphabet = t_alphabet; error = xserviceinternational_get_ucs_conversion_table( - alphabet, &unclaimed, - (void**)&ucstable); - if (error) { + alphabet, &unclaimed, &ostable); + if (error != NULL) { LOG(("failed reading UCS conversion table: 0x%x: %s", error->errnum, error->errmess)); - /* try using our own table instead */ + /* Try using our own table instead */ ucstable = ucstable_from_alphabet(alphabet); - } - if (unclaimed) + } else if (unclaimed) { /* Service wasn't claimed so use our own ucstable */ ucstable = ucstable_from_alphabet(alphabet); + } else { + /* Use the table provided by the OS */ + ucstable = ostable; + } } if (c < 256) { |