home · contact · privacy
MAJOR re-write. Split plomrogue into a server and a client. Re-wrote large parts
[plomrogue] / src / server / cleanup.h
1 /* src/server/cleanup.h
2  *
3  * Stuff defining / performing the cleanup called by rexit.h's exit functions.
4  */
5
6 #ifndef CLEANUP_H
7 #define CLEANUP_H
8
9
10
11 /* set_cleanup_flag() sets any of the flags defined in cleanup_flag to announce
12  * the resources that need cleaning up upon program exit. It is to be called at
13  * the earliest moment possible after resource creation / initialization.
14  */
15 enum cleanup_flag
16 {
17     CLEANUP_FIFO            = 0x0001,
18     CLEANUP_OUTFILE         = 0x0002,
19     CLEANUP_MAP_OBJECT_DEFS = 0x0004,
20     CLEANUP_MAP_OBJECTS     = 0x0008,
21     CLEANUP_MAP_OBJECT_ACTS = 0x0010
22 };
23
24 extern void set_cleanup_flag(enum cleanup_flag flag);
25
26 /* Frees memory and unlinks some files. */
27 extern void cleanup();
28
29
30
31 #endif