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

Function X11_outrip

win/X11/winX.c:1410–1436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1408
1409#ifdef GRAPHIC_TOMBSTONE
1410void
1411X11_outrip(winid window, int how, time_t when)
1412{
1413 struct xwindow *wp;
1414 FILE *rip_fp = 0;
1415
1416 check_winid(window);
1417 wp = &window_list[window];
1418
1419 /* make sure the graphical tombstone is available; it's not easy to
1420 revert to the ASCII-art text tombstone once we're past this point */
1421 if (appResources.tombstone && *appResources.tombstone)
1422 rip_fp = fopen(appResources.tombstone, "r"); /* "rip.xpm" */
1423 if (!rip_fp) {
1424 genl_outrip(window, how, when);
1425 return;
1426 }
1427 (void) fclose(rip_fp);
1428
1429 if (wp->type == NHW_TEXT) {
1430 wp->text_information->is_rip = TRUE;
1431 } else {
1432 panic("ripout on non-text window (window type [%d])", wp->type);
1433 }
1434
1435 calculate_rip_text(how, when);
1436}
1437#endif
1438
1439/* init and exit nhwindows ------------------------------------------------ */

Callers

nothing calls this directly

Calls 4

genl_outripFunction · 0.85
fcloseFunction · 0.85
calculate_rip_textFunction · 0.85
panicFunction · 0.50

Tested by

no test coverage detected