diff options
| author | Gerd Moellmann | 2000-08-03 20:09:56 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-08-03 20:09:56 +0000 |
| commit | 8dd095ee459c2b07f883af513573abe42024c4a4 (patch) | |
| tree | 4d4dcbcf0b052ec8b081e00cfa73d4c72f91bc82 | |
| parent | 2d23c8cc174a93b8bc5baf347332bde3992c0954 (diff) | |
| download | emacs-8dd095ee459c2b07f883af513573abe42024c4a4.tar.gz emacs-8dd095ee459c2b07f883af513573abe42024c4a4.zip | |
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 *).
| -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) | |||
| 73 | XtNy, &pos_y, | 73 | XtNy, &pos_y, |
| 74 | XtNtopOfThumb, &widget_topOfThumb, | 74 | XtNtopOfThumb, &widget_topOfThumb, |
| 75 | XtNshown, &widget_shown, | 75 | XtNshown, &widget_shown, |
| 76 | 0); | 76 | NULL); |
| 77 | 77 | ||
| 78 | /* | 78 | /* |
| 79 | * First size and position the scrollbar widget. | 79 | * First size and position the scrollbar widget. |
| @@ -88,7 +88,7 @@ xaw_update_scrollbar (instance, widget, val) | |||
| 88 | XtVaSetValues (widget, | 88 | XtVaSetValues (widget, |
| 89 | XtNlength, data->scrollbar_height, | 89 | XtNlength, data->scrollbar_height, |
| 90 | XtNthickness, width, | 90 | XtNthickness, width, |
| 91 | 0); | 91 | NULL); |
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | /* | 94 | /* |
| @@ -141,7 +141,7 @@ xaw_update_one_widget (instance, widget, val, deep_p) | |||
| 141 | Dimension bw = 0; | 141 | Dimension bw = 0; |
| 142 | Arg al[3]; | 142 | Arg al[3]; |
| 143 | 143 | ||
| 144 | XtVaGetValues (widget, XtNborderWidth, &bw, 0); | 144 | XtVaGetValues (widget, XtNborderWidth, &bw, NULL); |
| 145 | if (bw == 0) | 145 | if (bw == 0) |
| 146 | /* Don't let buttons end up with 0 borderwidth, that's ugly... | 146 | /* Don't let buttons end up with 0 borderwidth, that's ugly... |
| 147 | Yeah, all this should really be done through app-defaults files | 147 | Yeah, all this should really be done through app-defaults files |
| @@ -476,7 +476,7 @@ xaw_generic_callback (widget, closure, call_data) | |||
| 476 | 476 | ||
| 477 | #if 0 | 477 | #if 0 |
| 478 | user_data = NULL; | 478 | user_data = NULL; |
| 479 | XtVaGetValues (widget, XtNuserData, &user_data, 0); | 479 | XtVaGetValues (widget, XtNuserData, &user_data, NULL); |
| 480 | #else | 480 | #else |
| 481 | /* Damn! Athena doesn't give us a way to hang our own data on the | 481 | /* Damn! Athena doesn't give us a way to hang our own data on the |
| 482 | buttons, so we have to go find it... I guess this assumes that | 482 | buttons, so we have to go find it... I guess this assumes that |
| @@ -512,8 +512,8 @@ wm_delete_window (shell, closure, call_data) | |||
| 512 | Widget widget; | 512 | Widget widget; |
| 513 | if (! XtIsSubclass (shell, shellWidgetClass)) | 513 | if (! XtIsSubclass (shell, shellWidgetClass)) |
| 514 | abort (); | 514 | abort (); |
| 515 | XtVaGetValues (shell, XtNnumChildren, &nkids, 0); | 515 | XtVaGetValues (shell, XtNnumChildren, &nkids, NULL); |
| 516 | XtVaGetValues (shell, XtNchildren, &kids, 0); | 516 | XtVaGetValues (shell, XtNchildren, &kids, NULL); |
| 517 | if (!kids || !*kids) | 517 | if (!kids || !*kids) |
| 518 | abort (); | 518 | abort (); |
| 519 | for (i = 0; i < nkids; i++) | 519 | for (i = 0; i < nkids; i++) |
| @@ -607,7 +607,7 @@ xaw_create_scrollbar (instance) | |||
| 607 | Dimension width; | 607 | Dimension width; |
| 608 | Widget scrollbar; | 608 | Widget scrollbar; |
| 609 | 609 | ||
| 610 | XtVaGetValues (instance->parent, XtNwidth, &width, 0); | 610 | XtVaGetValues (instance->parent, XtNwidth, &width, NULL); |
| 611 | 611 | ||
| 612 | XtSetArg (av[ac], XtNshowGrip, 0); ac++; | 612 | XtSetArg (av[ac], XtNshowGrip, 0); ac++; |
| 613 | XtSetArg (av[ac], XtNresizeToPreferred, 1); ac++; | 613 | XtSetArg (av[ac], XtNresizeToPreferred, 1); ac++; |
| @@ -622,7 +622,7 @@ xaw_create_scrollbar (instance) | |||
| 622 | 622 | ||
| 623 | /* We have to force the border width to be 0 otherwise the | 623 | /* We have to force the border width to be 0 otherwise the |
| 624 | geometry manager likes to start looping for awhile... */ | 624 | geometry manager likes to start looping for awhile... */ |
| 625 | XtVaSetValues (scrollbar, XtNborderWidth, 0, 0); | 625 | XtVaSetValues (scrollbar, XtNborderWidth, 0, NULL); |
| 626 | 626 | ||
| 627 | XtRemoveAllCallbacks (scrollbar, "jumpProc"); | 627 | XtRemoveAllCallbacks (scrollbar, "jumpProc"); |
| 628 | XtRemoveAllCallbacks (scrollbar, "scrollProc"); | 628 | 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) | |||
| 388 | Widget widget; | 388 | Widget widget; |
| 389 | widget_value* val; | 389 | widget_value* val; |
| 390 | { | 390 | { |
| 391 | XtVaSetValues (widget, XmNalignment, XmALIGNMENT_CENTER, 0); | 391 | XtVaSetValues (widget, XmNalignment, XmALIGNMENT_CENTER, NULL); |
| 392 | XtRemoveAllCallbacks (widget, XmNactivateCallback); | 392 | XtRemoveAllCallbacks (widget, XmNactivateCallback); |
| 393 | XtAddCallback (widget, XmNactivateCallback, xm_generic_callback, instance); | 393 | XtAddCallback (widget, XmNactivateCallback, xm_generic_callback, instance); |
| 394 | } | 394 | } |
| @@ -416,7 +416,7 @@ xm_update_toggle (instance, widget, val) | |||
| 416 | XtAddCallback (widget, XmNvalueChangedCallback, | 416 | XtAddCallback (widget, XmNvalueChangedCallback, |
| 417 | xm_generic_callback, instance); | 417 | xm_generic_callback, instance); |
| 418 | XtVaSetValues (widget, XmNset, val->selected, | 418 | XtVaSetValues (widget, XmNset, val->selected, |
| 419 | XmNalignment, XmALIGNMENT_BEGINNING, 0); | 419 | XmNalignment, XmALIGNMENT_BEGINNING, NULL); |
| 420 | } | 420 | } |
| 421 | 421 | ||
| 422 | static void | 422 | static void |
| @@ -444,11 +444,11 @@ xm_update_radiobox (instance, widget, val) | |||
| 444 | toggle = XtNameToWidget (widget, cur->value); | 444 | toggle = XtNameToWidget (widget, cur->value); |
| 445 | if (toggle) | 445 | if (toggle) |
| 446 | { | 446 | { |
| 447 | XtVaSetValues (toggle, XmNsensitive, cur->enabled, 0); | 447 | XtVaSetValues (toggle, XmNsensitive, cur->enabled, NULL); |
| 448 | if (!val->value && cur->selected) | 448 | if (!val->value && cur->selected) |
| 449 | XtVaSetValues (toggle, XmNset, cur->selected, 0); | 449 | XtVaSetValues (toggle, XmNset, cur->selected, NULL); |
| 450 | if (val->value && strcmp (val->value, cur->value)) | 450 | if (val->value && strcmp (val->value, cur->value)) |
| 451 | XtVaSetValues (toggle, XmNset, False, 0); | 451 | XtVaSetValues (toggle, XmNset, False, NULL); |
| 452 | } | 452 | } |
| 453 | } | 453 | } |
| 454 | 454 | ||
| @@ -457,7 +457,7 @@ xm_update_radiobox (instance, widget, val) | |||
| 457 | { | 457 | { |
| 458 | toggle = XtNameToWidget (widget, val->value); | 458 | toggle = XtNameToWidget (widget, val->value); |
| 459 | if (toggle) | 459 | if (toggle) |
| 460 | XtVaSetValues (toggle, XmNset, True, 0); | 460 | XtVaSetValues (toggle, XmNset, True, NULL); |
| 461 | } | 461 | } |
| 462 | } | 462 | } |
| 463 | 463 | ||
| @@ -619,13 +619,13 @@ make_menu_in_widget (instance, widget, val, keep_first_children) | |||
| 619 | XmNmenuHelpWidget work, we need to set it before managing the | 619 | XmNmenuHelpWidget work, we need to set it before managing the |
| 620 | children.. --gerd. */ | 620 | children.. --gerd. */ |
| 621 | if (button) | 621 | if (button) |
| 622 | XtVaSetValues (widget, XmNmenuHelpWidget, button, 0); | 622 | XtVaSetValues (widget, XmNmenuHelpWidget, button, NULL); |
| 623 | 623 | ||
| 624 | /* LessTif apparently doesn't recompute centered text when more | 624 | /* LessTif apparently doesn't recompute centered text when more |
| 625 | widgets are added. So, do it after all widgets have been | 625 | widgets are added. So, do it after all widgets have been |
| 626 | created. */ | 626 | created. */ |
| 627 | if (title) | 627 | if (title) |
| 628 | XtVaSetValues (title, XmNalignment, XmALIGNMENT_CENTER, 0); | 628 | XtVaSetValues (title, XmNalignment, XmALIGNMENT_CENTER, NULL); |
| 629 | 629 | ||
| 630 | if (num_children) | 630 | if (num_children) |
| 631 | XtManageChildren (children, num_children); | 631 | XtManageChildren (children, num_children); |
| @@ -655,7 +655,7 @@ update_one_menu_entry (instance, widget, val, deep_p) | |||
| 655 | XtVaSetValues (widget, | 655 | XtVaSetValues (widget, |
| 656 | XmNsensitive, val->enabled, | 656 | XmNsensitive, val->enabled, |
| 657 | XmNuserData, val->call_data, | 657 | XmNuserData, val->call_data, |
| 658 | 0); | 658 | NULL); |
| 659 | 659 | ||
| 660 | /* update the menu button as a label. */ | 660 | /* update the menu button as a label. */ |
| 661 | if (val->this_one_change >= VISIBLE_CHANGE) | 661 | if (val->this_one_change >= VISIBLE_CHANGE) |
| @@ -858,7 +858,7 @@ xm_update_one_widget (instance, widget, val, deep_p) | |||
| 858 | XtVaSetValues (widget, | 858 | XtVaSetValues (widget, |
| 859 | XmNsensitive, val->enabled, | 859 | XmNsensitive, val->enabled, |
| 860 | XmNuserData, val->call_data, | 860 | XmNuserData, val->call_data, |
| 861 | 0); | 861 | NULL); |
| 862 | 862 | ||
| 863 | /* Common to all label like widgets */ | 863 | /* Common to all label like widgets */ |
| 864 | if (XtIsSubclass (widget, xmLabelWidgetClass)) | 864 | if (XtIsSubclass (widget, xmLabelWidgetClass)) |
| @@ -928,7 +928,7 @@ xm_update_one_value (instance, widget, val) | |||
| 928 | 928 | ||
| 929 | if (class == xmToggleButtonWidgetClass || class == xmToggleButtonGadgetClass) | 929 | if (class == xmToggleButtonWidgetClass || class == xmToggleButtonGadgetClass) |
| 930 | { | 930 | { |
| 931 | XtVaGetValues (widget, XmNset, &val->selected, 0); | 931 | XtVaGetValues (widget, XmNset, &val->selected, NULL); |
| 932 | val->edited = True; | 932 | val->edited = True; |
| 933 | } | 933 | } |
| 934 | else if (class == xmTextWidgetClass) | 934 | else if (class == xmTextWidgetClass) |
| @@ -963,7 +963,7 @@ xm_update_one_value (instance, widget, val) | |||
| 963 | int set = False; | 963 | int set = False; |
| 964 | Widget toggle = radio->composite.children [i]; | 964 | Widget toggle = radio->composite.children [i]; |
| 965 | 965 | ||
| 966 | XtVaGetValues (toggle, XmNset, &set, 0); | 966 | XtVaGetValues (toggle, XmNset, &set, NULL); |
| 967 | if (set) | 967 | if (set) |
| 968 | { | 968 | { |
| 969 | if (val->value) | 969 | if (val->value) |
| @@ -1343,9 +1343,9 @@ recenter_widget (widget) | |||
| 1343 | Position x; | 1343 | Position x; |
| 1344 | Position y; | 1344 | Position y; |
| 1345 | 1345 | ||
| 1346 | XtVaGetValues (widget, XtNwidth, &child_width, XtNheight, &child_height, 0); | 1346 | XtVaGetValues (widget, XtNwidth, &child_width, XtNheight, &child_height, NULL); |
| 1347 | XtVaGetValues (parent, XtNwidth, &parent_width, XtNheight, &parent_height, | 1347 | XtVaGetValues (parent, XtNwidth, &parent_width, XtNheight, &parent_height, |
| 1348 | 0); | 1348 | NULL); |
| 1349 | 1349 | ||
| 1350 | x = (((Position)parent_width) - ((Position)child_width)) / 2; | 1350 | x = (((Position)parent_width) - ((Position)child_width)) / 2; |
| 1351 | y = (((Position)parent_height) - ((Position)child_height)) / 2; | 1351 | y = (((Position)parent_height) - ((Position)child_height)) / 2; |
| @@ -1362,7 +1362,7 @@ recenter_widget (widget) | |||
| 1362 | if (y < 0) | 1362 | if (y < 0) |
| 1363 | y = 0; | 1363 | y = 0; |
| 1364 | 1364 | ||
| 1365 | XtVaSetValues (widget, XtNx, x, XtNy, y, 0); | 1365 | XtVaSetValues (widget, XtNx, x, XtNy, y, NULL); |
| 1366 | } | 1366 | } |
| 1367 | 1367 | ||
| 1368 | static Widget | 1368 | static Widget |
| @@ -1393,7 +1393,7 @@ recycle_instance (instance) | |||
| 1393 | /* shrink the separator label back to their original size */ | 1393 | /* shrink the separator label back to their original size */ |
| 1394 | separator = XtNameToWidget (widget, "*separator_button"); | 1394 | separator = XtNameToWidget (widget, "*separator_button"); |
| 1395 | if (separator) | 1395 | if (separator) |
| 1396 | XtVaSetValues (separator, XtNwidth, 5, XtNheight, 5, 0); | 1396 | XtVaSetValues (separator, XtNwidth, 5, XtNheight, 5, NULL); |
| 1397 | 1397 | ||
| 1398 | /* Center the dialog in its parent */ | 1398 | /* Center the dialog in its parent */ |
| 1399 | recenter_widget (widget); | 1399 | recenter_widget (widget); |
| @@ -1739,7 +1739,7 @@ xm_popup_menu (widget, event) | |||
| 1739 | else if (event->xbutton.state & Button3Mask) trans = "<Btn3Down>"; | 1739 | else if (event->xbutton.state & Button3Mask) trans = "<Btn3Down>"; |
| 1740 | else if (event->xbutton.state & Button2Mask) trans = "<Btn2Down>"; | 1740 | else if (event->xbutton.state & Button2Mask) trans = "<Btn2Down>"; |
| 1741 | else if (event->xbutton.state & Button1Mask) trans = "<Btn1Down>"; | 1741 | else if (event->xbutton.state & Button1Mask) trans = "<Btn1Down>"; |
| 1742 | if (trans) XtVaSetValues (widget, XmNmenuPost, trans, 0); | 1742 | if (trans) XtVaSetValues (widget, XmNmenuPost, trans, NULL); |
| 1743 | XmMenuPosition (widget, (XButtonPressedEvent *) event); | 1743 | XmMenuPosition (widget, (XButtonPressedEvent *) event); |
| 1744 | } | 1744 | } |
| 1745 | XtManageChild (widget); | 1745 | XtManageChild (widget); |
| @@ -1751,8 +1751,8 @@ set_min_dialog_size (w) | |||
| 1751 | { | 1751 | { |
| 1752 | short width; | 1752 | short width; |
| 1753 | short height; | 1753 | short height; |
| 1754 | XtVaGetValues (w, XmNwidth, &width, XmNheight, &height, 0); | 1754 | XtVaGetValues (w, XmNwidth, &width, XmNheight, &height, NULL); |
| 1755 | XtVaSetValues (w, XmNminWidth, width, XmNminHeight, height, 0); | 1755 | XtVaSetValues (w, XmNminWidth, width, XmNminHeight, height, NULL); |
| 1756 | } | 1756 | } |
| 1757 | 1757 | ||
| 1758 | void | 1758 | 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) | |||
| 1383 | XtVaGetValues (widget_to_invert, | 1383 | XtVaGetValues (widget_to_invert, |
| 1384 | XtNforeground, &foreground, | 1384 | XtNforeground, &foreground, |
| 1385 | XtNbackground, &background, | 1385 | XtNbackground, &background, |
| 1386 | 0); | 1386 | NULL); |
| 1387 | XtVaSetValues (widget_to_invert, | 1387 | XtVaSetValues (widget_to_invert, |
| 1388 | XtNforeground, background, | 1388 | XtNforeground, background, |
| 1389 | XtNbackground, foreground, | 1389 | XtNbackground, foreground, |
| 1390 | 0); | 1390 | NULL); |
| 1391 | } | 1391 | } |
| 1392 | 1392 | ||
| 1393 | void | 1393 | void |