2 * End-of-run cleanup helper code used by cleanup.c.
4 * Copyright (C) 2006-2007 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 3 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, visit the http://fsf.org website.
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. */
25 #if !defined EXIT_CLEANUP_CASE_0
26 #define EXIT_CLEANUP_CASE_0
28 #elif !defined EXIT_CLEANUP_CASE_1
29 #define EXIT_CLEANUP_CASE_1
31 #elif !defined EXIT_CLEANUP_CASE_2
32 #define EXIT_CLEANUP_CASE_2
34 #elif !defined EXIT_CLEANUP_CASE_3
35 #define EXIT_CLEANUP_CASE_3
37 #elif !defined EXIT_CLEANUP_CASE_4
38 #define EXIT_CLEANUP_CASE_4
40 #elif !defined EXIT_CLEANUP_CASE_5
41 #define EXIT_CLEANUP_CASE_5
43 #elif !defined EXIT_CLEANUP_CASE_6
44 #define EXIT_CLEANUP_CASE_6
46 #elif !defined EXIT_CLEANUP_CASE_7
47 #define EXIT_CLEANUP_CASE_7
49 #elif !defined EXIT_CLEANUP_CASE_8
50 #define EXIT_CLEANUP_CASE_8
52 #elif !defined EXIT_CLEANUP_CASE_9
53 #define EXIT_CLEANUP_CASE_9
55 #elif !defined EXIT_CLEANUP_CASE_10
56 #define EXIT_CLEANUP_CASE_10
58 #elif !defined EXIT_CLEANUP_CASE_11
59 #define EXIT_CLEANUP_CASE_11
61 #elif !defined EXIT_CLEANUP_CASE_12
62 #define EXIT_CLEANUP_CASE_12
64 #elif !defined EXIT_CLEANUP_CASE_13
65 #define EXIT_CLEANUP_CASE_13
67 #elif !defined EXIT_CLEANUP_CASE_14
68 #define EXIT_CLEANUP_CASE_14
70 #elif !defined EXIT_CLEANUP_CASE_15
71 #define EXIT_CLEANUP_CASE_15
73 #elif !defined EXIT_CLEANUP_CASE_16
74 #define EXIT_CLEANUP_CASE_16
77 #error Need to add more case statements!