| 5180 | } |
| 5181 | |
| 5182 | void |
| 5183 | end_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 | |
| 5212 | staticfn char |
no test coverage detected