diff options
author | Gerd Moellmann <gerd@gnu.org> | 2000-08-03 20:09:56 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 2000-08-03 20:09:56 +0000 |
commit | 8dd095ee459c2b07f883af513573abe42024c4a4 (patch) | |
tree | 4d4dcbcf0b052ec8b081e00cfa73d4c72f91bc82 /lwlib | |
parent | 2d23c8cc174a93b8bc5baf347332bde3992c0954 (diff) | |
download | emacs-8dd095ee459c2b07f883af513573abe42024c4a4.tar.gz |
Use NULL at the end of the
variable argument lists of XtVaSetValues and XtVaGetValues
functions because 0 is not sufficient on systems where sizeof
(int) < sizeof (void *).
Diffstat (limited to 'lwlib')
-rw-r--r-- | lwlib/lwlib-Xaw.c | 16 | ||||
-rw-r--r-- | lwlib/lwlib-Xm.c | 38 | ||||
-rw-r--r-- | lwlib/lwlib.c | 4 |
3 files changed, 29 insertions, 29 deletions
diff --git a/lwlib/lwlib-Xaw.c b/lwlib/lwlib-Xaw.c index c7750c303c4..5a1c9d2f268 100644 --- a/lwlib/lwlib-Xaw.c +++ b/lwlib/lwlib-Xaw.c @@ -73,7 +73,7 @@ xaw_update_scrollbar (instance, widget, val) XtNy, &pos_y, XtNtopOfThumb, &widget_topOfThumb, XtNshown, &widget_shown, - 0); + NULL); /* * First size and position the scrollbar widget. @@ -88,7 +88,7 @@ xaw_update_scrollbar (instance, widget, val) XtVaSetValues (widget, XtNlength, data->scrollbar_height, XtNthickness, width, - 0); + NULL); } /* @@ -141,7 +141,7 @@ xaw_update_one_widget (instance, widget, val, deep_p) Dimension bw = 0; Arg al[3]; - XtVaGetValues (widget, XtNborderWidth, &bw, 0); + XtVaGetValues (widget, XtNborderWidth, &bw, NULL); if (bw == 0) /* Don't let buttons end up with 0 borderwidth, that's ugly... Yeah, all this should really be done through app-defaults files @@ -476,7 +476,7 @@ xaw_generic_callback (widget, closure, call_data) #if 0 user_data = NULL; - XtVaGetValues (widget, XtNuserData, &user_data, 0); + XtVaGetValues (widget, XtNuserData, &user_data, NULL); #else /* Damn! Athena doesn't give us a way to hang our own data on the buttons, so we have to go find it... I guess this assumes that @@ -512,8 +512,8 @@ wm_delete_window (shell, closure, call_data) Widget widget; if (! XtIsSubclass (shell, shellWidgetClass)) abort (); - XtVaGetValues (shell, XtNnumChildren, &nkids, 0); - XtVaGetValues (shell, XtNchildren, &kids, 0); + XtVaGetValues (shell, XtNnumChildren, &nkids, NULL); + XtVaGetValues (shell, XtNchildren, &kids, NULL); if (!kids || !*kids) abort (); for (i = 0; i < nkids; i++) @@ -607,7 +607,7 @@ xaw_create_scrollbar (instance) Dimension width; Widget scrollbar; - XtVaGetValues (instance->parent, XtNwidth, &width, 0); + XtVaGetValues (instance->parent, XtNwidth, &width, NULL); XtSetArg (av[ac], XtNshowGrip, 0); ac++; XtSetArg (av[ac], XtNresizeToPreferred, 1); ac++; @@ -622,7 +622,7 @@ xaw_create_scrollbar (instance) /* We have to force the border width to be 0 otherwise the geometry manager likes to start looping for awhile... */ - XtVaSetValues (scrollbar, XtNborderWidth, 0, 0); + XtVaSetValues (scrollbar, XtNborderWidth, 0, NULL); XtRemoveAllCallbacks (scrollbar, "jumpProc"); XtRemoveAllCallbacks (scrollbar, "scrollProc"); diff --git a/lwlib/lwlib-Xm.c b/lwlib/lwlib-Xm.c index 6bb70e1f439..b33a53e43fc 100644 --- a/lwlib/lwlib-Xm.c +++ b/lwlib/lwlib-Xm.c @@ -388,7 +388,7 @@ xm_update_pushbutton (instance, widget, val) Widget widget; widget_value* val; { - XtVaSetValues (widget, XmNalignment, XmALIGNMENT_CENTER, 0); + XtVaSetValues (widget, XmNalignment, XmALIGNMENT_CENTER, NULL); XtRemoveAllCallbacks (widget, XmNactivateCallback); XtAddCallback (widget, XmNactivateCallback, xm_generic_callback, instance); } @@ -416,7 +416,7 @@ xm_update_toggle (instance, widget, val) XtAddCallback (widget, XmNvalueChangedCallback, xm_generic_callback, instance); XtVaSetValues (widget, XmNset, val->selected, - XmNalignment, XmALIGNMENT_BEGINNING, 0); + XmNalignment, XmALIGNMENT_BEGINNING, NULL); } static void @@ -444,11 +444,11 @@ xm_update_radiobox (instance, widget, val) toggle = XtNameToWidget (widget, cur->value); if (toggle) { - XtVaSetValues (toggle, XmNsensitive, cur->enabled, 0); + XtVaSetValues (toggle, XmNsensitive, cur->enabled, NULL); if (!val->value && cur->selected) - XtVaSetValues (toggle, XmNset, cur->selected, 0); + XtVaSetValues (toggle, XmNset, cur->selected, NULL); if (val->value && strcmp (val->value, cur->value)) - XtVaSetValues (toggle, XmNset, False, 0); + XtVaSetValues (toggle, XmNset, False, NULL); } } @@ -457,7 +457,7 @@ xm_update_radiobox (instance, widget, val) { toggle = XtNameToWidget (widget, val->value); if (toggle) - XtVaSetValues (toggle, XmNset, True, 0); + XtVaSetValues (toggle, XmNset, True, NULL); } } @@ -619,13 +619,13 @@ make_menu_in_widget (instance, widget, val, keep_first_children) XmNmenuHelpWidget work, we need to set it before managing the children.. --gerd. */ if (button) - XtVaSetValues (widget, XmNmenuHelpWidget, button, 0); + XtVaSetValues (widget, XmNmenuHelpWidget, button, NULL); /* LessTif apparently doesn't recompute centered text when more widgets are added. So, do it after all widgets have been created. */ if (title) - XtVaSetValues (title, XmNalignment, XmALIGNMENT_CENTER, 0); + XtVaSetValues (title, XmNalignment, XmALIGNMENT_CENTER, NULL); if (num_children) XtManageChildren (children, num_children); @@ -655,7 +655,7 @@ update_one_menu_entry (instance, widget, val, deep_p) XtVaSetValues (widget, XmNsensitive, val->enabled, XmNuserData, val->call_data, - 0); + NULL); /* update the menu button as a label. */ if (val->this_one_change >= VISIBLE_CHANGE) @@ -858,7 +858,7 @@ xm_update_one_widget (instance, widget, val, deep_p) XtVaSetValues (widget, XmNsensitive, val->enabled, XmNuserData, val->call_data, - 0); + NULL); /* Common to all label like widgets */ if (XtIsSubclass (widget, xmLabelWidgetClass)) @@ -928,7 +928,7 @@ xm_update_one_value (instance, widget, val) if (class == xmToggleButtonWidgetClass || class == xmToggleButtonGadgetClass) { - XtVaGetValues (widget, XmNset, &val->selected, 0); + XtVaGetValues (widget, XmNset, &val->selected, NULL); val->edited = True; } else if (class == xmTextWidgetClass) @@ -963,7 +963,7 @@ xm_update_one_value (instance, widget, val) int set = False; Widget toggle = radio->composite.children [i]; - XtVaGetValues (toggle, XmNset, &set, 0); + XtVaGetValues (toggle, XmNset, &set, NULL); if (set) { if (val->value) @@ -1343,9 +1343,9 @@ recenter_widget (widget) Position x; Position y; - XtVaGetValues (widget, XtNwidth, &child_width, XtNheight, &child_height, 0); + XtVaGetValues (widget, XtNwidth, &child_width, XtNheight, &child_height, NULL); XtVaGetValues (parent, XtNwidth, &parent_width, XtNheight, &parent_height, - 0); + NULL); x = (((Position)parent_width) - ((Position)child_width)) / 2; y = (((Position)parent_height) - ((Position)child_height)) / 2; @@ -1362,7 +1362,7 @@ recenter_widget (widget) if (y < 0) y = 0; - XtVaSetValues (widget, XtNx, x, XtNy, y, 0); + XtVaSetValues (widget, XtNx, x, XtNy, y, NULL); } static Widget @@ -1393,7 +1393,7 @@ recycle_instance (instance) /* shrink the separator label back to their original size */ separator = XtNameToWidget (widget, "*separator_button"); if (separator) - XtVaSetValues (separator, XtNwidth, 5, XtNheight, 5, 0); + XtVaSetValues (separator, XtNwidth, 5, XtNheight, 5, NULL); /* Center the dialog in its parent */ recenter_widget (widget); @@ -1739,7 +1739,7 @@ xm_popup_menu (widget, event) else if (event->xbutton.state & Button3Mask) trans = "<Btn3Down>"; else if (event->xbutton.state & Button2Mask) trans = "<Btn2Down>"; else if (event->xbutton.state & Button1Mask) trans = "<Btn1Down>"; - if (trans) XtVaSetValues (widget, XmNmenuPost, trans, 0); + if (trans) XtVaSetValues (widget, XmNmenuPost, trans, NULL); XmMenuPosition (widget, (XButtonPressedEvent *) event); } XtManageChild (widget); @@ -1751,8 +1751,8 @@ set_min_dialog_size (w) { short width; short height; - XtVaGetValues (w, XmNwidth, &width, XmNheight, &height, 0); - XtVaSetValues (w, XmNminWidth, width, XmNminHeight, height, 0); + XtVaGetValues (w, XmNwidth, &width, XmNheight, &height, NULL); + XtVaSetValues (w, XmNminWidth, width, XmNminHeight, height, NULL); } void diff --git a/lwlib/lwlib.c b/lwlib/lwlib.c index 82de7be3daf..eb0804a480e 100644 --- a/lwlib/lwlib.c +++ b/lwlib/lwlib.c @@ -1383,11 +1383,11 @@ show_one_widget_busy (w, flag) XtVaGetValues (widget_to_invert, XtNforeground, &foreground, XtNbackground, &background, - 0); + NULL); XtVaSetValues (widget_to_invert, XtNforeground, background, XtNbackground, foreground, - 0); + NULL); } void |