(I_NONE, I_CIVIL, I_MILIT, I_SHELL, I_GUN, I_PETROL, I_IRON, I_DUST,

I_BAR, I_FOOD, I_OIL, I_LCM, I_HCM, I_UW, I_RAD, I_MAX): Turn macros
into enumeration constants.
(i_type): New.  Use where appropriate.  No functional changes, except
that I_NONE is now catched properly in a few places.
This commit is contained in:
Marc Olzheim 2004-09-16 21:18:01 +00:00
parent 308430e751
commit d30942632b
38 changed files with 143 additions and 134 deletions

View file

@ -69,7 +69,7 @@ dodistribute(struct sctstr *sp, int imex, s_char *path, double dist_i_cost,
int pack;
double mcost;
int diff;
int item;
i_type item;
int changed;
int rplague;
int lplague;
@ -91,7 +91,7 @@ dodistribute(struct sctstr *sp, int imex, s_char *path, double dist_i_cost,
sect_packing = sp->sct_effic >= 60 ? dchr[sp->sct_type].d_pkg : IPKG;
lplague = rplague = changed = 0;
for (item = 1; item < I_MAX + 1; item++) {
for (item = I_NONE + 1; item <= I_MAX; item++) {
if (sp->sct_dist[item] == 0)
continue;
ip = &ichr[item];