jkh@pcsbst.UUCP (Jordan K. Hubbard) (04/19/89)
The list widget suffers (on some machines, like ours) from the fact that many of the width/height variables being passed to various toolkit procedures are declared as int, rather than Dimension (which is currently a ushort). The following patches should help: Still doesn't deal with the problem where the member name "index" in _XtListReturnStruct gets #define'd to "strchr" on system V systems, but maybe someone can change the name/documentation to work around this? (please?) *** /usr/graph2/X11.3/lib/Xaw/List.c Wed Apr 5 14:54:21 1989 --- List.c Tue Apr 18 19:04:20 1989 *************** *** 204,211 **** Boolean changex, changey; { ListWidget lw = (ListWidget) w; ! int width = w->core.width; ! int height = w->core.height; if (lw->list.nitems == 0) /* Get number of items. */ while (lw->list.list[lw->list.nitems] != NULL) --- 204,211 ---- Boolean changex, changey; { ListWidget lw = (ListWidget) w; ! Dimension width = w->core.width; ! Dimension height = w->core.height; if (lw->list.nitems == 0) /* Get number of items. */ while (lw->list.list[lw->list.nitems] != NULL) *************** *** 238,246 **** static void ChangeSize(w, width, height) Widget w; ! int width, height; { ! int w_ret, h_ret; (void) Layout(w, FALSE, FALSE, &width, &height); --- 238,246 ---- static void ChangeSize(w, width, height) Widget w; ! Dimension width, height; { ! Dimension w_ret, h_ret; (void) Layout(w, FALSE, FALSE, &width, &height); *************** *** 539,545 **** Widget w; XtWidgetGeometry *intended, *requested; { ! int width_req, height_req, new_width, new_height; Boolean change; width_req = intended->request_mode & CWWidth; --- 539,545 ---- Widget w; XtWidgetGeometry *intended, *requested; { ! Dimension width_req, height_req, new_width, new_height; Boolean change; width_req = intended->request_mode & CWWidth; *************** *** 587,593 **** Resize(w) Widget w; { ! int width, height; width = w->core.width; height = w->core.height; --- 587,593 ---- Resize(w) Widget w; { ! Dimension width, height; width = w->core.width; height = w->core.height; *************** *** 613,619 **** Layout(w, xfree, yfree, width, height) Widget w; Boolean xfree, yfree; ! int *width, *height; { ListWidget lw = (ListWidget) w; Boolean change = FALSE; --- 613,619 ---- Layout(w, xfree, yfree, width, height) Widget w; Boolean xfree, yfree; ! Dimension *width, *height; { ListWidget lw = (ListWidget) w; Boolean change = FALSE;