Freeciv-3.4
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/* common */
17#include "fc_types.h"
18
19#if ((IS_BETA_VERSION || IS_DEVEL_VERSION) && !defined(FREECIV_NDEBUG)) \
20 || defined(FREECIV_DEBUG)
21# define SANITY_CHECKING
22#endif
23
24#ifdef SANITY_CHECKING
25
26# define sanity_check_city(x) \
27 real_sanity_check_city(x, __FILE__,__FUNCTION__, __FC_LINE__)
28void real_sanity_check_city(struct city *pcity, const char *file,
29 const char *function, int line);
30
31# define sanity_check_tile(x) \
32 real_sanity_check_tile(x, __FILE__,__FUNCTION__, __FC_LINE__)
33void real_sanity_check_tile(struct tile *ptile, const char *file,
34 const char *function, int line);
35
36# define sanity_check() \
37 real_sanity_check(__FILE__, __FUNCTION__, __FC_LINE__)
38void real_sanity_check( const char *file, const char *function, int line);
39
40#else /* SANITY_CHECKING */
41
42# define sanity_check_city(x) (void)0
43# define sanity_check_tile(x) (void)0
44# define sanity_check() (void)0
45
46#endif /* SANITY_CHECKING */
47
48
49#endif /* FC__SANITYCHECK_H */
char * incite_cost
Definition comments.c:77
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:318
Definition tile.h:50