From fbec0d96c9fbbe830d20b7076282683034181ce5 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Fri, 27 Mar 2009 17:54:33 +0000 Subject: Another wimp_window_state->wimp_open conversion. Avoid aliasing an int ** and a void **. svn path=/trunk/netsurf/; revision=6946 --- riscos/wimp_event.c | 18 +++++++++++------- 1 file 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) { -- cgit v1.2.3