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

Function sanity_check

src/wizcmds.c:1459–1481  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1457}
1458
1459void
1460sanity_check(void)
1461{
1462 if (iflags.sanity_no_check) {
1463 /* in case a recurring sanity_check warning occurs, we mustn't
1464 re-trigger it when ^P is used, otherwise msg_window:Single
1465 and msg_window:Combination will always repeat the most recent
1466 instance, never able to go back to any earlier messages */
1467 iflags.sanity_no_check = FALSE;
1468 return;
1469 }
1470 program_state.in_sanity_check++;
1471 you_sanity_check();
1472 obj_sanity_check();
1473 timer_sanity_check();
1474 mon_sanity_check();
1475 light_sources_sanity_check();
1476 bc_sanity_check();
1477 trap_sanity_check();
1478 engraving_sanity_check();
1479 levl_sanity_check();
1480 program_state.in_sanity_check--;
1481}
1482
1483/* qsort() comparison routine for use in list_migrating_mons() */
1484staticfn int QSORTCALLBACK

Callers 1

allmain.cFile · 0.85

Calls 9

you_sanity_checkFunction · 0.85
obj_sanity_checkFunction · 0.85
timer_sanity_checkFunction · 0.85
mon_sanity_checkFunction · 0.85
bc_sanity_checkFunction · 0.85
trap_sanity_checkFunction · 0.85
engraving_sanity_checkFunction · 0.85
levl_sanity_checkFunction · 0.85

Tested by

no test coverage detected