1 /* src/server/cleanup.h
3 * This file is part of PlomRogue. PlomRogue is licensed under the GPL version 3
4 * or any later version. For details on its copyright, license, and warranties,
5 * see the file NOTICE in the root directory of the PlomRogue source package.
7 * Stuff defining / performing the cleanup called by rexit.h's exit functions.
15 /* set_cleanup_flag() sets any of the flags defined in cleanup_flag to announce
16 * the resources that need cleaning up upon program exit. It is to be called at
17 * the earliest moment possible after resource creation / initialization.
21 CLEANUP_FIFO = 0x0001,
22 CLEANUP_WORLDSTATE = 0x0002,
23 CLEANUP_THING_TYPES = 0x0004,
24 CLEANUP_THINGS = 0x0008,
25 CLEANUP_THING_ACTIONS = 0x0010,
30 /* In addition, unset_cleanup_flag() may be used to unset flags. */
31 extern void set_cleanup_flag(enum cleanup_flag flag);
32 extern void unset_cleanup_flag(enum cleanup_flag flag);
34 /* Frees memory and unlinks some files. */
35 extern void cleanup();