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 | |
ba2133d6 WD |
7 | * it under the terms of the GNU General Public License version 2 as |
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 | |
16 | * with this program; if not, write to the Free Software Foundation, Inc., | |
17 | * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. | |
18 | */ | |
19 | ||
a4b4e077 WD |
20 | /* This is included by cleanup.c multiple times, once for every segement in |
21 | * the _exit_cleanup() code. This produces the next "case N:" statement in | |
22 | * sequence and increments the cleanup_step variable by 1. This ensures that | |
23 | * our case statements never get out of whack due to added/removed steps. */ | |
fdd10da6 WD |
24 | |
25 | #if !defined EXIT_CLEANUP_CASE_0 | |
26 | #define EXIT_CLEANUP_CASE_0 | |
27 | case 0: | |
28 | #elif !defined EXIT_CLEANUP_CASE_1 | |
29 | #define EXIT_CLEANUP_CASE_1 | |
30 | case 1: | |
31 | #elif !defined EXIT_CLEANUP_CASE_2 | |
32 | #define EXIT_CLEANUP_CASE_2 | |
33 | case 2: | |
34 | #elif !defined EXIT_CLEANUP_CASE_3 | |
35 | #define EXIT_CLEANUP_CASE_3 | |
36 | case 3: | |
37 | #elif !defined EXIT_CLEANUP_CASE_4 | |
38 | #define EXIT_CLEANUP_CASE_4 | |
39 | case 4: | |
40 | #elif !defined EXIT_CLEANUP_CASE_5 | |
41 | #define EXIT_CLEANUP_CASE_5 | |
42 | case 5: | |
43 | #elif !defined EXIT_CLEANUP_CASE_6 | |
44 | #define EXIT_CLEANUP_CASE_6 | |
45 | case 6: | |
46 | #elif !defined EXIT_CLEANUP_CASE_7 | |
47 | #define EXIT_CLEANUP_CASE_7 | |
48 | case 7: | |
49 | #elif !defined EXIT_CLEANUP_CASE_8 | |
50 | #define EXIT_CLEANUP_CASE_8 | |
51 | case 8: | |
52 | #elif !defined EXIT_CLEANUP_CASE_9 | |
53 | #define EXIT_CLEANUP_CASE_9 | |
54 | case 9: | |
55 | #elif !defined EXIT_CLEANUP_CASE_10 | |
56 | #define EXIT_CLEANUP_CASE_10 | |
57 | case 10: | |
58 | #elif !defined EXIT_CLEANUP_CASE_11 | |
59 | #define EXIT_CLEANUP_CASE_11 | |
60 | case 11: | |
61 | #elif !defined EXIT_CLEANUP_CASE_12 | |
62 | #define EXIT_CLEANUP_CASE_12 | |
63 | case 12: | |
64 | #elif !defined EXIT_CLEANUP_CASE_13 | |
65 | #define EXIT_CLEANUP_CASE_13 | |
66 | case 13: | |
67 | #elif !defined EXIT_CLEANUP_CASE_14 | |
68 | #define EXIT_CLEANUP_CASE_14 | |
69 | case 14: | |
70 | #elif !defined EXIT_CLEANUP_CASE_15 | |
71 | #define EXIT_CLEANUP_CASE_15 | |
72 | case 15: | |
73 | #elif !defined EXIT_CLEANUP_CASE_16 | |
74 | #define EXIT_CLEANUP_CASE_16 | |
75 | case 16: | |
76 | #else | |
77 | #error Need to add more case statements! | |
78 | #endif | |
79 | cleanup_step++; |