caddr_t is obsolete. Replace by void *, except for struct empfile
member cache, which becomes char * to keep pointer arithmetic simple.
This commit is contained in:
parent
059353e957
commit
dcfd251f95
40 changed files with 80 additions and 82 deletions
|
@ -213,7 +213,7 @@ grab_sect(register struct sctstr *sp, natid to)
|
|||
|
||||
pp = &p;
|
||||
snxtitem_xy(&ni, EF_PLANE, sp->sct_x, sp->sct_y);
|
||||
while (nxtitem(&ni, (caddr_t)pp)) {
|
||||
while (nxtitem(&ni, pp)) {
|
||||
if (pp->pln_own == 0)
|
||||
continue;
|
||||
if (pp->pln_ship >= 0)
|
||||
|
@ -236,7 +236,7 @@ grab_sect(register struct sctstr *sp, natid to)
|
|||
|
||||
np = &nuk;
|
||||
snxtitem_xy(&ni, EF_NUKE, sp->sct_x, sp->sct_y);
|
||||
while (nxtitem(&ni, (caddr_t)np)) {
|
||||
while (nxtitem(&ni, np)) {
|
||||
if (np->nuk_own == 0)
|
||||
continue;
|
||||
|
||||
|
@ -251,7 +251,7 @@ grab_sect(register struct sctstr *sp, natid to)
|
|||
|
||||
lp = &l;
|
||||
snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
|
||||
while (nxtitem(&ni, (caddr_t)lp)) {
|
||||
while (nxtitem(&ni, lp)) {
|
||||
if (lp->lnd_own == 0)
|
||||
continue;
|
||||
if (lp->lnd_ship == 0)
|
||||
|
@ -342,7 +342,7 @@ grab_ship(register struct shpstr *sp, natid to)
|
|||
|
||||
pp = &p;
|
||||
snxtitem_xy(&ni, EF_PLANE, sp->shp_x, sp->shp_y);
|
||||
while (nxtitem(&ni, (caddr_t)pp)) {
|
||||
while (nxtitem(&ni, pp)) {
|
||||
if (pp->pln_own == 0)
|
||||
continue;
|
||||
if (pp->pln_flags & PLN_LAUNCHED)
|
||||
|
@ -365,7 +365,7 @@ grab_ship(register struct shpstr *sp, natid to)
|
|||
|
||||
lp = &l;
|
||||
snxtitem_xy(&ni, EF_LAND, sp->shp_x, sp->shp_y);
|
||||
while (nxtitem(&ni, (caddr_t)lp)) {
|
||||
while (nxtitem(&ni, lp)) {
|
||||
if (lp->lnd_own == 0)
|
||||
continue;
|
||||
if (lp->lnd_ship != sp->shp_uid)
|
||||
|
|
|
@ -144,7 +144,7 @@ cons_choose(struct ltcomstr *ltcp)
|
|||
sprintf(prompt, "%s number? ", ltcp->Name);
|
||||
if ((ltcp->num = onearg(player->argp[2], prompt)) < 0)
|
||||
return RET_SYN;
|
||||
if (!ef_read(ltcp->type, ltcp->num, (caddr_t)<cp->u) ||
|
||||
if (!ef_read(ltcp->type, ltcp->num, <cp->u) ||
|
||||
!(ltcp->type == EF_TREATY
|
||||
? distrea(ltcp->num, <cp->u.t)
|
||||
: disloan(ltcp->num, <cp->u.l))) {
|
||||
|
@ -204,7 +204,7 @@ loan_accept(struct ltcomstr *ltcp)
|
|||
pr("%s %d is still pending.\n", ltcp->Name, ltcp->num);
|
||||
return RET_OK;
|
||||
}
|
||||
if (!getloan(ltcp->num, (caddr_t)lp)) {
|
||||
if (!getloan(ltcp->num, lp)) {
|
||||
pr("loan_accept: can't read loan; get help!\n");
|
||||
return RET_SYS;
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ fina(void)
|
|||
prdate();
|
||||
pr("Loan From To Rate Dur Paid Total\n");
|
||||
snxtitem(&ni, EF_LOAN, "*");
|
||||
while (nxtitem(&ni, (caddr_t)&loan)) {
|
||||
while (nxtitem(&ni, &loan)) {
|
||||
if (loan.l_status != LS_SIGNED)
|
||||
continue;
|
||||
pr(" %-2d (%3d) %-8.8s (%3d) %-8.8s ", ni.cur,
|
||||
|
|
|
@ -205,7 +205,7 @@ launch_as(struct plnstr *pp)
|
|||
}
|
||||
goodtarget = 0;
|
||||
snxtitem_dist(&ni, EF_PLANE, sx, sy, 0);
|
||||
while (!goodtarget && nxtitem(&ni, (caddr_t)&plane)) {
|
||||
while (!goodtarget && nxtitem(&ni, &plane)) {
|
||||
if (!plane.pln_own)
|
||||
continue;
|
||||
if (!(plane.pln_flags & PLN_LAUNCHED))
|
||||
|
|
|
@ -786,7 +786,7 @@ quiet_bigdef(int attacker, struct emp_qelem *list, natid own, natid aown,
|
|||
return 0;
|
||||
dam = 0;
|
||||
snxtitem_dist(&ni, EF_SHIP, ax, ay, 8);
|
||||
while (nxtitem(&ni, (caddr_t)&ship)) {
|
||||
while (nxtitem(&ni, &ship)) {
|
||||
if (ship.shp_own == 0)
|
||||
continue;
|
||||
|
||||
|
@ -874,7 +874,7 @@ quiet_bigdef(int attacker, struct emp_qelem *list, natid own, natid aown,
|
|||
}
|
||||
}
|
||||
snxtitem_dist(&ni, EF_LAND, ax, ay, 8);
|
||||
while (nxtitem(&ni, (caddr_t)&land)) {
|
||||
while (nxtitem(&ni, &land)) {
|
||||
if (land.lnd_own == 0)
|
||||
continue;
|
||||
if (land.lnd_effic < LAND_MINFIREEFF)
|
||||
|
|
|
@ -159,7 +159,7 @@ sona(void)
|
|||
}
|
||||
memset(visbuf, 0, (WORLD_Y * (WORLD_X + 1)));
|
||||
snxtitem_dist(&nit, EF_SHIP, ship.shp_x, ship.shp_y, range);
|
||||
while (nxtitem(&nit, (caddr_t)&targ)) {
|
||||
while (nxtitem(&nit, &targ)) {
|
||||
|
||||
if (targ.shp_own == player->cnum || targ.shp_own == 0)
|
||||
continue;
|
||||
|
|
|
@ -207,7 +207,7 @@ expose_ship(struct shpstr *s1, struct shpstr *s2)
|
|||
*/
|
||||
|
||||
int
|
||||
tend_nxtitem(struct nstr_item *np, caddr_t ptr)
|
||||
tend_nxtitem(struct nstr_item *np, void *ptr)
|
||||
{
|
||||
struct genitem *gp;
|
||||
int selected;
|
||||
|
|
|
@ -111,7 +111,7 @@ tran_nuke(void)
|
|||
snxtitem_xy(&nstr, EF_NUKE, sect.sct_x, sect.sct_y);
|
||||
#endif
|
||||
found = 0;
|
||||
while (nxtitem(&nstr, (caddr_t)&nuke)) {
|
||||
while (nxtitem(&nstr, &nuke)) {
|
||||
if (player->owner) {
|
||||
found = 1;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue