Index: common/improvement.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/improvement.c,v retrieving revision 1.23 diff -u -r1.23 improvement.c --- common/improvement.c 2002/08/07 11:21:46 1.23 +++ common/improvement.c 2002/10/15 21:54:42 @@ -133,9 +133,9 @@ Convert effect range names to enum; case insensitive; returns EFR_LAST if can't match. **************************************************************************/ -Eff_Range_id effect_range_from_str(const char *str) +enum Eff_Range_id effect_range_from_str(const char *str) { - Eff_Range_id ret_id; + enum Eff_Range_id ret_id; assert(ARRAY_SIZE(effect_range_names) == EFR_LAST); @@ -151,7 +151,7 @@ /************************************************************************** Return effect range name; NULL if bad id. **************************************************************************/ -const char *effect_range_name(Eff_Range_id id) +const char *effect_range_name(enum Eff_Range_id id) { assert(ARRAY_SIZE(effect_range_names) == EFR_LAST); @@ -166,9 +166,9 @@ Convert effect type names to enum; case insensitive; returns EFT_LAST if can't match. **************************************************************************/ -Eff_Type_id effect_type_from_str(const char *str) +enum Eff_Type_id effect_type_from_str(const char *str) { - Eff_Type_id ret_id; + enum Eff_Type_id ret_id; assert(ARRAY_SIZE(effect_type_names) == EFT_LAST); @@ -184,7 +184,7 @@ /************************************************************************** Return effect type name; NULL if bad id. **************************************************************************/ -const char *effect_type_name(Eff_Type_id id) +const char *effect_type_name(enum Eff_Type_id id) { assert(ARRAY_SIZE(effect_type_names) == EFT_LAST); @@ -444,7 +444,7 @@ if (impr->effect) { struct impr_effect *peffect = impr->effect; - Eff_Type_id type; + enum Eff_Type_id type; /* This if for a spaceship component is asked */ while ((type = peffect->type) != EFT_LAST) { @@ -506,7 +506,7 @@ **************************************************************************/ void mark_improvement(struct city *pcity,Impr_Type_id id,Impr_Status status) { - Eff_Range_id equiv_range; + enum Eff_Range_id equiv_range; Impr_Status *improvements,*equiv_list[EFR_LAST]; struct player *pplayer; Index: common/improvement.h =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/improvement.h,v retrieving revision 1.12 diff -u -r1.12 improvement.h --- common/improvement.h 2002/08/07 11:21:46 1.12 +++ common/improvement.h 2002/10/15 21:54:42 @@ -74,7 +74,7 @@ * Used in equiv_range and effect.range fields. * (These must correspond to effect_range_names[] in improvement.c.) */ -enum effect_range_id { +enum Eff_Range_id { EFR_NONE, EFR_BUILDING, EFR_CITY, @@ -84,13 +84,11 @@ EFR_LAST /* keep this last */ }; -typedef enum effect_range_id Eff_Range_id; - /* Type of effects. * Used in effect.type field. * (These must correspond to effect_type_names[] in improvement.c.) */ -enum effect_type_id { +enum Eff_Type_id { EFT_ADV_PARASITE, EFT_AIRLIFT, EFT_ANY_GOVERNMENT, @@ -165,19 +163,17 @@ EFT_LAST /* keep this last */ }; -typedef enum effect_type_id Eff_Type_id; - /* An effect conferred by an improvement. */ struct impr_effect { - Eff_Type_id type; - Eff_Range_id range; + enum Eff_Type_id type; + enum Eff_Range_id range; int amount; int survives; /* 1 = effect survives wonder destruction */ Impr_Type_id cond_bldg; /* B_LAST = unconditional */ int cond_gov; /* game.government_count = unconditional */ Tech_Type_id cond_adv; /* A_NONE = unconditional; A_LAST = never */ - Eff_Type_id cond_eff; /* EFT_LAST = unconditional */ + enum Eff_Type_id cond_eff; /* EFT_LAST = unconditional */ Unit_Class_id aff_unit; /* UCL_LAST = all */ enum tile_terrain_type aff_terr; /* T_UNKNOWN = all; T_LAST = none */ enum tile_special_type aff_spec; /* S_* bit mask of specials affected */ @@ -227,7 +223,7 @@ Impr_Type_id bldg_req; /* B_LAST = none required */ enum tile_terrain_type *terr_gate; /* list; T_LAST terminated */ enum tile_special_type *spec_gate; /* list; S_NO_SPECIAL terminated */ - Eff_Range_id equiv_range; + enum Eff_Range_id equiv_range; Impr_Type_id *equiv_dupl; /* list; B_LAST terminated */ Impr_Type_id *equiv_repl; /* list; B_LAST terminated */ Tech_Type_id obsolete_by; /* A_NONE = never obsolete */ @@ -257,10 +253,10 @@ /* improvement effect functions */ -Eff_Range_id effect_range_from_str(const char *str); -const char *effect_range_name(Eff_Range_id id); -Eff_Type_id effect_type_from_str(const char *str); -const char *effect_type_name(Eff_Type_id id); +enum Eff_Range_id effect_range_from_str(const char *str); +const char *effect_range_name(enum Eff_Range_id id); +enum Eff_Type_id effect_type_from_str(const char *str); +const char *effect_type_name(enum Eff_Type_id id); void get_effect_vectors(struct ceff_vector *ceffs[], struct geff_vector *geffs[], Index: common/packets.h =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/packets.h,v retrieving revision 1.125 diff -u -r1.125 packets.h --- common/packets.h 2002/09/25 00:58:12 1.125 +++ common/packets.h 2002/10/15 21:54:42 @@ -637,7 +637,7 @@ Impr_Type_id bldg_req; enum tile_terrain_type *terr_gate; enum tile_special_type *spec_gate; - Eff_Range_id equiv_range; + enum Eff_Range_id equiv_range; Impr_Type_id *equiv_dupl; Impr_Type_id *equiv_repl; Tech_Type_id obsolete_by;