Commit | Line | Data |
---|---|---|
fdd10da6 WD |
1 | /* |
2 | * End-of-run cleanup helper code used by cleanup.c. | |
3 | * | |
ba2133d6 | 4 | * Copyright (C) 2006-2007 Wayne Davison |
fdd10da6 WD |
5 | * |
6 | * This program is free software; you can redistribute it and/or modify | |
4fd842f9 | 7 | * it under the terms of the GNU General Public License version 3 as |
ba2133d6 | 8 | * published by the Free Software Foundation. |
fdd10da6 WD |
9 | * |
10 | * This program is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | * GNU General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU General Public License along | |
4fd842f9 | 16 | * with this program; if not, visit the http://fsf.org website. |
fdd10da6 WD |
17 | */ |
18 | ||
a4b4e077 WD |
19 | /* This is included by cleanup.c multiple times, once for every segement in |
20 | * the _exit_cleanup() code. This produces the next "case N:" statement in | |
21 | * sequence and increments the cleanup_step variable by 1. This ensures that | |
22 | * our case statements never get out of whack due to added/removed steps. */ | |
fdd10da6 WD |
23 | |
24 | #if !defined EXIT_CLEANUP_CASE_0 | |
25 | #define EXIT_CLEANUP_CASE_0 | |
26 | case 0: | |
27 | #elif !defined EXIT_CLEANUP_CASE_1 | |
28 | #define EXIT_CLEANUP_CASE_1 | |
29 | case 1: | |
30 | #elif !defined EXIT_CLEANUP_CASE_2 | |
31 | #define EXIT_CLEANUP_CASE_2 | |
32 | case 2: | |
33 | #elif !defined EXIT_CLEANUP_CASE_3 | |
34 | #define EXIT_CLEANUP_CASE_3 | |
35 | case 3: | |
36 | #elif !defined EXIT_CLEANUP_CASE_4 | |
37 | #define EXIT_CLEANUP_CASE_4 | |
38 | case 4: | |
39 | #elif !defined EXIT_CLEANUP_CASE_5 | |
40 | #define EXIT_CLEANUP_CASE_5 | |
41 | case 5: | |
42 | #elif !defined EXIT_CLEANUP_CASE_6 | |
43 | #define EXIT_CLEANUP_CASE_6 | |
44 | case 6: | |
45 | #elif !defined EXIT_CLEANUP_CASE_7 | |
46 | #define EXIT_CLEANUP_CASE_7 | |
47 | case 7: | |
48 | #elif !defined EXIT_CLEANUP_CASE_8 | |
49 | #define EXIT_CLEANUP_CASE_8 | |
50 | case 8: | |
51 | #elif !defined EXIT_CLEANUP_CASE_9 | |
52 | #define EXIT_CLEANUP_CASE_9 | |
53 | case 9: | |
54 | #elif !defined EXIT_CLEANUP_CASE_10 | |
55 | #define EXIT_CLEANUP_CASE_10 | |
56 | case 10: | |
57 | #elif !defined EXIT_CLEANUP_CASE_11 | |
58 | #define EXIT_CLEANUP_CASE_11 | |
59 | case 11: | |
60 | #elif !defined EXIT_CLEANUP_CASE_12 | |
61 | #define EXIT_CLEANUP_CASE_12 | |
62 | case 12: | |
63 | #elif !defined EXIT_CLEANUP_CASE_13 | |
64 | #define EXIT_CLEANUP_CASE_13 | |
65 | case 13: | |
66 | #elif !defined EXIT_CLEANUP_CASE_14 | |
67 | #define EXIT_CLEANUP_CASE_14 | |
68 | case 14: | |
69 | #elif !defined EXIT_CLEANUP_CASE_15 | |
70 | #define EXIT_CLEANUP_CASE_15 | |
71 | case 15: | |
72 | #elif !defined EXIT_CLEANUP_CASE_16 | |
73 | #define EXIT_CLEANUP_CASE_16 | |
74 | case 16: | |
75 | #else | |
76 | #error Need to add more case statements! | |
77 | #endif | |
78 | cleanup_step++; |