some very old systems, or descendents of such systems, expect signal handlers to have return type `int', but they don't actually inspect the return value so we should be safe using `void' unconditionally */ ARGUSED*/
| 5156 | the return value so we should be safe using `void' unconditionally */ |
| 5157 | /*ARGUSED*/ |
| 5158 | void |
| 5159 | hangup( |
| 5160 | int sig_unused UNUSED) /* called as signal() handler, so sent |
| 5161 | * at least one arg */ |
| 5162 | { |
| 5163 | if (program_state.exiting) |
| 5164 | program_state.in_moveloop = 0; |
| 5165 | nhwindows_hangup(); |
| 5166 | #ifdef SAFERHANGUP |
| 5167 | /* When using SAFERHANGUP, the done_hup flag is tested in rhack |
| 5168 | and a couple of other places; actual hangup handling occurs then. |
| 5169 | This is 'safer' because it disallows certain cheats and also |
| 5170 | protects against losing objects in the process of being thrown, |
| 5171 | but also potentially riskier because the disconnected program |
| 5172 | must continue running longer before attempting a hangup save. */ |
| 5173 | program_state.done_hup++; |
| 5174 | /* defer hangup iff game appears to be in progress */ |
| 5175 | if (program_state.in_moveloop |
| 5176 | && program_state.something_worth_saving) |
| 5177 | return; |
| 5178 | #endif /* SAFERHANGUP */ |
| 5179 | end_of_input(); |
| 5180 | } |
| 5181 | |
| 5182 | void |
| 5183 | end_of_input(void) |
no test coverage detected