3 * Routines to exit the game orderly or on error, with as much cleaning up as is
4 * possible in both cases.
17 /* set_cleanup_flag() sets any of the flags defined in cleanup_flag to announce
18 * the resources that need cleaning up upon program exit. It is to be called at
19 * the earliest moment possible after resource creation / initialization.
23 CLEANUP_NCURSES = 0x01,
25 CLEANUP_KEYBINDINGS = 0x04,
28 extern void set_cleanup_flag(enum cleanup_flag flag);
32 /* Exit orderly, clean up. */
33 extern void exit_game(struct World * world);
37 /* If fail != 0, exit with an error message "msg" and clean up. (For "fail",
38 * pass the result of functions that return non-zero as an error status and
39 * thereby avoid bloating up the code with if-error-conditionals.)
41 extern void exit_err(unsigned char fail, struct World * world, char * msg);