From: handa Date: Thu, 30 Oct 2008 02:44:32 +0000 (+0000) Subject: (update_scroll_bar): Use XawScrollbarSetThumb. X-Git-Tag: XML-base~3 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f61db83a4b02e947dff984d9b3a821c67935a5f;p=m17n%2Fm17n-lib.git (update_scroll_bar): Use XawScrollbarSetThumb. (FilterProc): Fix strict aliasing bug. --- diff --git a/example/medit.c b/example/medit.c index 6cb9389..fe6fad2 100644 --- a/example/medit.c +++ b/example/medit.c @@ -353,12 +353,8 @@ update_scroll_bar (int from, int to) { float top = (float) from / nchars; float shown = (float) (to - from) / nchars; - XtArgVal *l_top = (XtArgVal *) ⊤ - XtArgVal *l_shown = (XtArgVal *) &shown; - XtSetArg (arg[0], XtNtopOfThumb, *l_top); - XtSetArg (arg[1], XtNshown, *l_shown); - XtSetValues (SbarWidget, arg, 2); + XawScrollbarSetThumb (SbarWidget, top, shown); } @@ -1945,7 +1941,7 @@ FilterProc (Widget w, XtPointer client_data, XtPointer call_data) handle = dlopen (filter_module, RTLD_NOW); if (! handle) return; - *(void **) (&func) = dlsym (handle, "filter"); + func = (void (*) (MText *, int, int)) dlsym (handle, "filter"); if (func) (*func) (mt, mtext_property_start (selection), mtext_property_end (selection));