Mercurial > hg > xemacs-beta
comparison lwlib/lwlib.c @ 2286:04bc9d2f42c7
[xemacs-hg @ 2004-09-20 19:18:55 by james]
Mark all unused parameters as unused. Also eliminate some unneeded local
variables.
author | james |
---|---|
date | Mon, 20 Sep 2004 19:20:08 +0000 |
parents | c2569faae8ed |
children | facf3239ba30 |
comparison
equal
deleted
inserted
replaced
2285:914c5afaac33 | 2286:04bc9d2f42c7 |
---|---|
364 memset (info, '\0', sizeof (widget_info)); | 364 memset (info, '\0', sizeof (widget_info)); |
365 free (info); | 365 free (info); |
366 } | 366 } |
367 | 367 |
368 static void | 368 static void |
369 mark_widget_destroyed (Widget widget, XtPointer closure, XtPointer call_data) | 369 mark_widget_destroyed (Widget widget, XtPointer closure, |
370 XtPointer UNUSED (call_data)) | |
370 { | 371 { |
371 widget_instance *instance = (widget_instance*)closure; | 372 widget_instance *instance = (widget_instance*)closure; |
372 | 373 |
373 /* be very conservative */ | 374 /* be very conservative */ |
374 if (instance->widget == widget) | 375 if (instance->widget == widget) |
510 { | 511 { |
511 if (!!s1 ^ !!s2) return True; | 512 if (!!s1 ^ !!s2) return True; |
512 return (s1 && s2) ? strcmp (s1, s2) : s1 ? False : !!s2; | 513 return (s1 && s2) ? strcmp (s1, s2) : s1 ? False : !!s2; |
513 } | 514 } |
514 | 515 |
515 #ifndef WIN32_NATIVE | |
516 static change_type | |
517 max (change_type i1, change_type i2) | |
518 { | |
519 return (int)i1 > (int)i2 ? i1 : i2; | |
520 } | |
521 #endif | |
522 | |
523 | |
524 #if 0 | 516 #if 0 |
525 # define EXPLAIN(name, oc, nc, desc, a1, a2) \ | 517 # define EXPLAIN(name, oc, nc, desc, a1, a2) \ |
526 printf ("Change: \"%s\"\tmax(%s=%d,%s=%d)\t%s %d %d\n", \ | 518 printf ("Change: \"%s\"\tmax(%s=%d,%s=%d)\t%s %d %d\n", \ |
527 name, \ | 519 name, \ |
528 (oc == NO_CHANGE ? "none" : \ | 520 (oc == NO_CHANGE ? "none" : \ |
670 { | 662 { |
671 if (merged_next->change) | 663 if (merged_next->change) |
672 { | 664 { |
673 EXPLAIN (val1->name, change, merged_next->change, "(following change)", | 665 EXPLAIN (val1->name, change, merged_next->change, "(following change)", |
674 0, 0); | 666 0, 0); |
667 change = max (change, merged_next->change); | |
675 } | 668 } |
676 change = max (change, merged_next->change); | |
677 } | 669 } |
678 | 670 |
679 val1->next = merged_next; | 671 val1->next = merged_next; |
680 | 672 |
681 val1->change = change; | 673 val1->change = change; |
1275 /* This function can be used as a an XtCallback for the widgets that get | 1267 /* This function can be used as a an XtCallback for the widgets that get |
1276 modified to update other instances of the widgets. Closure should be the | 1268 modified to update other instances of the widgets. Closure should be the |
1277 widget_instance. */ | 1269 widget_instance. */ |
1278 void | 1270 void |
1279 lw_internal_update_other_instances (Widget widget, XtPointer closure, | 1271 lw_internal_update_other_instances (Widget widget, XtPointer closure, |
1280 XtPointer call_data) | 1272 XtPointer UNUSED (call_data)) |
1281 { | 1273 { |
1282 /* To forbid recursive calls */ | 1274 /* To forbid recursive calls */ |
1283 static Boolean updating; | 1275 static Boolean updating; |
1284 | 1276 |
1285 widget_instance *instance = (widget_instance*)closure; | 1277 widget_instance *instance = (widget_instance*)closure; |
1339 } | 1331 } |
1340 | 1332 |
1341 | 1333 |
1342 /* Show busy */ | 1334 /* Show busy */ |
1343 static void | 1335 static void |
1344 show_one_widget_busy (Widget w, Boolean flag) | 1336 show_one_widget_busy (Widget w, Boolean UNUSED (flag)) |
1345 { | 1337 { |
1346 Pixel foreground = 0; | 1338 Pixel foreground = 0; |
1347 Pixel background = 1; | 1339 Pixel background = 1; |
1348 Widget widget_to_invert = XtNameToWidget (w, "*sheet"); | 1340 Widget widget_to_invert = XtNameToWidget (w, "*sheet"); |
1349 Arg al [2]; | 1341 Arg al [2]; |