home · contact · privacy
ce4866dc1648792dc7d32c84b5f4ced3291851b2
[plomrogue] / src / client / cleanup.h
1 /* src/client/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_NCURSES    = 0x0001,
18     CLEANUP_INTERFACE  = 0x0002,
19     CLEANUP_COMMANDS   = 0x0004
20 };
21
22 extern void set_cleanup_flag(enum cleanup_flag flag);
23
24 /* Frees memory and properly winds down ncurses / resets the terminal. */
25 extern void cleanup();
26
27
28
29 #endif