Rework README.ruleset_civ2civ3 defense bonus description.
[freeciv.git] / server / sanitycheck.h
blob4071c427a4f471e711508ab09bdefd97c948c5af
1 /**********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 ***********************************************************************/
13 #ifndef FC__SANITYCHECK_H
14 #define FC__SANITYCHECK_H
16 #include "fc_types.h"
18 #if ((IS_BETA_VERSION || IS_DEVEL_VERSION) && !defined NDEBUG) \
19 || defined DEBUG
20 # define SANITY_CHECKING
21 #endif
23 #ifdef SANITY_CHECKING
25 # define sanity_check_city(x) \
26 real_sanity_check_city(x, __FILE__,__FUNCTION__, __FC_LINE__)
27 void real_sanity_check_city(struct city *pcity, const char *file,
28 const char *function, int line);
30 # define sanity_check_tile(x) \
31 real_sanity_check_tile(x, __FILE__,__FUNCTION__, __FC_LINE__)
32 void real_sanity_check_tile(struct tile *ptile, const char *file,
33 const char *function, int line);
35 # define sanity_check() \
36 real_sanity_check(__FILE__, __FUNCTION__, __FC_LINE__)
37 void real_sanity_check( const char *file, const char *function, int line);
39 #else /* SANITY_CHECKING */
41 # define sanity_check_city(x) (void)0
42 # define sanity_check_tile(x) (void)0
43 # define sanity_check() (void)0
45 #endif /* SANITY_CHECKING */
48 #endif /* FC__SANITYCHECK_H */