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