Freeciv-3.3
Loading...
Searching...
No Matches
sanitycheck.h
Go to the documentation of this file.
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.
7
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
15
16#include "fc_types.h"
17
18#if ((IS_BETA_VERSION || IS_DEVEL_VERSION) && !defined(FREECIV_NDEBUG)) \
19 || defined(FREECIV_DEBUG)
20# define SANITY_CHECKING
21#endif
22
23#ifdef SANITY_CHECKING
24
25# define sanity_check_city(x) \
26 real_sanity_check_city(x, __FILE__,__FUNCTION__, __FC_LINE__)
27void real_sanity_check_city(struct city *pcity, const char *file,
28 const char *function, int line);
29
30# define sanity_check_tile(x) \
31 real_sanity_check_tile(x, __FILE__,__FUNCTION__, __FC_LINE__)
32void real_sanity_check_tile(struct tile *ptile, const char *file,
33 const char *function, int line);
34
35# define sanity_check() \
36 real_sanity_check(__FILE__, __FUNCTION__, __FC_LINE__)
37void real_sanity_check( const char *file, const char *function, int line);
38
39#else /* SANITY_CHECKING */
40
41# define sanity_check_city(x) (void)0
42# define sanity_check_tile(x) (void)0
43# define sanity_check() (void)0
44
45#endif /* SANITY_CHECKING */
46
47
48#endif /* FC__SANITYCHECK_H */
char * incite_cost
Definition comments.c:76
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit int const struct action *paction struct unit struct city * pcity
Definition dialogs_g.h:78
Definition city.h:317
Definition tile.h:50