diff -Nurd -Xfreeciv/diff_ignore freeciv/client/climisc.c fi/client/climisc.c --- freeciv/client/climisc.c Sat Jan 12 01:00:12 2002 +++ fi/client/climisc.c Sat Jan 12 04:04:38 2002 @@ -113,13 +113,15 @@ **************************************************************************/ void client_remove_city(struct city *pcity) { +#ifdef TESTING int effect_update, i; +#endif int x=pcity->x; int y=pcity->y; freelog(LOG_DEBUG, "removing city %s, %s, (%d %d)", pcity->name, get_nation_name(city_owner(pcity)->nation), x, y); - +#ifdef TESTING /* Explicitly remove all improvements, to properly remove any global effects and to handle the preservation of "destroyed" effects. */ effect_update=FALSE; @@ -131,7 +133,7 @@ } if (effect_update) update_all_effects(); - +#endif popdown_city_dialog(pcity); game_remove_city(pcity); city_report_dialog_update(); @@ -1011,18 +1013,19 @@ **************************************************************************/ void renumber_island_impr_effect(int old, int newnumber) { - int i, j, changed; + int i/*, j*/, changed; changed=FALSE; players_iterate(plr) { Impr_Status *oldimpr, *newimpr; +#ifdef TESTING struct geff_vector *oldv, *newv; struct eff_global *olde, *newe; - +#endif assert(plr->island_improv); oldimpr=&plr->island_improv[game.num_impr_types*old]; newimpr=&plr->island_improv[game.num_impr_types*newnumber]; - +#ifdef TESTING oldv=&plr->island_effects[old]; newv=&plr->island_effects[newnumber]; @@ -1047,7 +1050,7 @@ olde->eff.impr = B_LAST; /* Mark the old entry as unused. */ } } - +#endif /* Now move all city improvements across. */ for (i=0; ieff.active = 0; eff->cityid = pcity->id; } +#endif } /************************************************************************** @@ -2195,10 +2198,11 @@ **************************************************************************/ void city_remove_improvement(struct city *pcity,Impr_Type_id impr) { +#ifdef TESTING struct ceff_vector *ceffs[2]; struct geff_vector *geffs[4]; int i, j; - +#endif freelog(LOG_DEBUG,"Improvement %s removed from city %s", improvement_types[impr].name,pcity->name); mark_improvement(pcity,impr,I_NONE); @@ -2214,7 +2218,7 @@ } city_list_iterate_end; } players_iterate_end; } - +#ifdef TESTING get_effect_vectors(ceffs, geffs, impr, pcity); /* Now remove the effects. */ @@ -2239,6 +2243,7 @@ } } } +#endif } /************************************************************************** diff -Nurd -Xfreeciv/diff_ignore freeciv/common/improvement.c fi/common/improvement.c --- freeciv/common/improvement.c Thu Jan 10 23:00:54 2002 +++ fi/common/improvement.c Sat Jan 12 03:58:09 2002 @@ -482,7 +482,7 @@ improvements[id] = status; } } - +#ifdef TESTING /************************************************************************** ... **************************************************************************/ @@ -613,3 +613,4 @@ geff_vector_reserve(x, n+1); return geff_vector_get(x, n); } +#endif diff -Nurd -Xfreeciv/diff_ignore freeciv/common/improvement.h fi/common/improvement.h --- freeciv/common/improvement.h Thu Jan 10 23:00:54 2002 +++ fi/common/improvement.h Sat Jan 12 03:58:38 2002 @@ -258,14 +258,14 @@ const char *effect_range_name(Eff_Range_id id); Eff_Type_id effect_type_from_str(char *str); const char *effect_type_name(Eff_Type_id id); - +#ifdef TESTING void get_effect_vectors(struct ceff_vector *ceffs[], struct geff_vector *geffs[], Impr_Type_id impr, struct city *pcity); void update_global_effect(struct city *pcity, struct eff_city *effect); struct eff_city *append_ceff(struct ceff_vector *x); struct eff_global *append_geff(struct geff_vector *x); - +#endif /* improvement functions */ struct impr_type *get_improvement_type(Impr_Type_id id); diff -Nurd -Xfreeciv/diff_ignore freeciv/server/citytools.c fi/server/citytools.c --- freeciv/server/citytools.c Thu Jan 10 23:00:54 2002 +++ fi/server/citytools.c Sat Jan 12 03:51:33 2002 @@ -1051,7 +1051,9 @@ city_remove_improvement(pcity,i); } } +#ifdef TESTING if (effect_update) +#endif update_all_effects(); /* This is cutpasted with modifications from transfer_city_units. Yes, it is ugly.