MCPcopy Index your code
hub / github.com/NetHack/NetHack / end_of_input

Function end_of_input

src/cmd.c:5182–5209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5180}
5181
5182void
5183end_of_input(void)
5184{
5185#ifdef NOSAVEONHANGUP
5186#ifdef INSURANCE
5187 if (flags.ins_chkpt && program_state.something_worth_saving)
5188 program_state.preserve_locks = 1; /* keep files for recovery */
5189#endif
5190 program_state.something_worth_saving = 0; /* don't save */
5191#endif
5192
5193 if (In_tutorial(&u.uz))
5194 program_state.something_worth_saving = 0; /* don't save in tutorial */
5195
5196#ifndef SAFERHANGUP
5197 if (!program_state.done_hup++)
5198#endif
5199 if (program_state.something_worth_saving)
5200 (void) dosave0();
5201 if (soundprocs.sound_exit_nhsound)
5202 (*soundprocs.sound_exit_nhsound)("end_of_input");
5203 if (iflags.window_inited)
5204 exit_nhwindows((char *) 0);
5205 clearlocks();
5206 nh_terminate(EXIT_SUCCESS);
5207 /*NOTREACHED*/ /* not necessarily true for vms... */
5208 return;
5209}
5210#endif /* HANGUPHANDLING */
5211
5212staticfn char

Callers 5

X11_error_handlerFunction · 0.85
X11_io_error_handlerFunction · 0.85
allmain.cFile · 0.85
rhackFunction · 0.85
hangupFunction · 0.85

Calls 3

dosave0Function · 0.85
clearlocksFunction · 0.85
nh_terminateFunction · 0.70

Tested by

no test coverage detected