MCPcopy Create free account
hub / github.com/NetHack/NetHack / null_out_status

Function null_out_status

win/X11/winstat.c:1488–1512  ·  view source on GitHub ↗

* Set all widget values to a null string. This is used after all spacings * have been calculated so that when the window is popped up we don't get all * kinds of funny values being displayed. */

Source from the content-addressed store, hash-verified

1486 * kinds of funny values being displayed.
1487 */
1488void
1489null_out_status(void)
1490{
1491 int i;
1492 struct X_status_value *sv;
1493 Arg args[1];
1494
1495 for (i = 0, sv = shown_stats; i < NUM_STATS; i++, sv++) {
1496 switch (sv->type) {
1497 case SV_VALUE:
1498 set_value(sv->w, "");
1499 break;
1500
1501 case SV_LABEL:
1502 case SV_NAME:
1503 XtSetArg(args[0], XtNlabel, "");
1504 XtSetValues(sv->w, args, ONE);
1505 break;
1506
1507 default:
1508 impossible("null_out_status: unknown type %d\n", sv->type);
1509 break;
1510 }
1511 }
1512}
1513
1514/* this is almost an exact duplicate of hilight_value() */
1515static void

Callers 1

init_standard_windowsFunction · 0.85

Calls 2

set_valueFunction · 0.85
impossibleFunction · 0.50

Tested by

no test coverage detected