2 * End-of-run cleanup helper code used by cleanup.c.
4 * Copyright (C) 2006 Wayne Davison
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.
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.
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.
21 /* The file cleanup.c includes this file multiple times, once for every
22 * time it wants to start a new segment its _exit_cleanup() code. This
23 * produces the next "case N:" statement in sequence and increments the
24 * cleanup_step variable. This ensures that our case statements never
25 * get out of whack due to added/removed steps. */
27 #if !defined EXIT_CLEANUP_CASE_0
28 #define EXIT_CLEANUP_CASE_0
30 #elif !defined EXIT_CLEANUP_CASE_1
31 #define EXIT_CLEANUP_CASE_1
33 #elif !defined EXIT_CLEANUP_CASE_2
34 #define EXIT_CLEANUP_CASE_2
36 #elif !defined EXIT_CLEANUP_CASE_3
37 #define EXIT_CLEANUP_CASE_3
39 #elif !defined EXIT_CLEANUP_CASE_4
40 #define EXIT_CLEANUP_CASE_4
42 #elif !defined EXIT_CLEANUP_CASE_5
43 #define EXIT_CLEANUP_CASE_5
45 #elif !defined EXIT_CLEANUP_CASE_6
46 #define EXIT_CLEANUP_CASE_6
48 #elif !defined EXIT_CLEANUP_CASE_7
49 #define EXIT_CLEANUP_CASE_7
51 #elif !defined EXIT_CLEANUP_CASE_8
52 #define EXIT_CLEANUP_CASE_8
54 #elif !defined EXIT_CLEANUP_CASE_9
55 #define EXIT_CLEANUP_CASE_9
57 #elif !defined EXIT_CLEANUP_CASE_10
58 #define EXIT_CLEANUP_CASE_10
60 #elif !defined EXIT_CLEANUP_CASE_11
61 #define EXIT_CLEANUP_CASE_11
63 #elif !defined EXIT_CLEANUP_CASE_12
64 #define EXIT_CLEANUP_CASE_12
66 #elif !defined EXIT_CLEANUP_CASE_13
67 #define EXIT_CLEANUP_CASE_13
69 #elif !defined EXIT_CLEANUP_CASE_14
70 #define EXIT_CLEANUP_CASE_14
72 #elif !defined EXIT_CLEANUP_CASE_15
73 #define EXIT_CLEANUP_CASE_15
75 #elif !defined EXIT_CLEANUP_CASE_16
76 #define EXIT_CLEANUP_CASE_16
79 #error Need to add more case statements!