(u_char, u_short, u_int): BSDisms. Figuring out whether sys/types.h
defines them would be possible, but isn't worth the trouble. Replace by unabbreviated types.
This commit is contained in:
parent
21bf6b41d4
commit
8054aafb9a
22 changed files with 109 additions and 113 deletions
|
@ -60,7 +60,7 @@ produce(struct natstr *np, struct sctstr *sp, short *vec, int work,
|
|||
struct pchrstr *product;
|
||||
double p_e;
|
||||
double prodeff;
|
||||
u_char *resource;
|
||||
unsigned char *resource;
|
||||
double output;
|
||||
int actual;
|
||||
int unit_work;
|
||||
|
@ -85,7 +85,7 @@ produce(struct natstr *np, struct sctstr *sp, short *vec, int work,
|
|||
p_e = neweff / 100.0;
|
||||
if (product->p_nrndx != 0) {
|
||||
unit_work++;
|
||||
resource = (u_char *)sp + product->p_nrndx;
|
||||
resource = (unsigned char *)sp + product->p_nrndx;
|
||||
p_e = (*resource * p_e) / 100.0;
|
||||
}
|
||||
/*
|
||||
|
|
|
@ -65,7 +65,7 @@ upd_buildeff(struct natstr *np, struct sctstr *sp, int *workp,
|
|||
int work_cost = 0;
|
||||
int buildeff_work = *workp / 2;
|
||||
int n, hcms, lcms, neweff;
|
||||
u_char old_type = *desig;
|
||||
unsigned char old_type = *desig;
|
||||
|
||||
*cost = 0;
|
||||
neweff = sp->sct_effic;
|
||||
|
|
|
@ -119,7 +119,7 @@ upd_ship(struct shpstr *sp, int etus,
|
|||
int max_oil;
|
||||
int max_food;
|
||||
struct pchrstr *product;
|
||||
u_char *resource;
|
||||
unsigned char *resource;
|
||||
int dep;
|
||||
int n;
|
||||
int mult;
|
||||
|
@ -180,7 +180,7 @@ upd_ship(struct shpstr *sp, int etus,
|
|||
if (sp->shp_item[I_OIL] + oil_gained > max_oil)
|
||||
oil_gained = max_oil - sp->shp_item[I_OIL];
|
||||
if (product->p_nrdep != 0 && oil_gained > 0) {
|
||||
resource = (u_char *)sectp + product->p_nrndx;
|
||||
resource = (unsigned char *)sectp + product->p_nrndx;
|
||||
if (*resource * 100 < product->p_nrdep * oil_gained)
|
||||
oil_gained = *resource * 100 / product->p_nrdep;
|
||||
dep = roundavg(oil_gained * product->p_nrdep / 100.0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue