Indentation fixes; suspect indent-emp is to blame.

This commit is contained in:
Markus Armbruster 2004-02-28 18:06:11 +00:00
parent aa4e268d89
commit e67dca9d29
29 changed files with 89 additions and 133 deletions

View file

@ -107,9 +107,7 @@ as_add_cachepath(struct as_data *adp)
/* And set some stuff */ /* And set some stuff */
from->x = adp->from.x; from->x = adp->from.x;
/* Here we malloc a whole bunch of tolist pointers. */ /* Here we malloc a whole bunch of tolist pointers. */
from->tolist = (struct as_topath **)calloc(1, from->tolist = calloc(1, sizeof(struct as_topath *) * WORLD_Y);
sizeof(struct as_topath
*) * WORLD_Y);
/* Now, add from to the global list */ /* Now, add from to the global list */
from->next = fromhead[adp->from.y]; from->next = fromhead[adp->from.y];
fromhead[adp->from.y] = from; fromhead[adp->from.y] = from;

View file

@ -110,8 +110,8 @@ bomb(void)
wantflags = 0; wantflags = 0;
if (!snxtitem(&ni_bomb, EF_PLANE, player->argp[1])) if (!snxtitem(&ni_bomb, EF_PLANE, player->argp[1]))
return RET_SYN; return RET_SYN;
if (!snxtitem if (!snxtitem(&ni_esc, EF_PLANE,
(&ni_esc, EF_PLANE, getstarg(player->argp[2], "escort(s)? ", buf))) getstarg(player->argp[2], "escort(s)? ", buf)))
pr("No escorts...\n"); pr("No escorts...\n");
if ((p = if ((p =
getstarg(player->argp[3], "pinpoint, or strategic? ", buf)) == 0) getstarg(player->argp[3], "pinpoint, or strategic? ", buf)) == 0)
@ -255,9 +255,8 @@ pin_bomb(struct emp_qelem *list, struct sctstr *target)
nunits = unitsatxy(target->sct_x, target->sct_y, 0, 0); nunits = unitsatxy(target->sct_x, target->sct_y, 0, 0);
getvec(VT_ITEM, vec, (s_char *)target, EF_SECTOR); getvec(VT_ITEM, vec, (s_char *)target, EF_SECTOR);
retry: retry:
p = getstring p = getstring("Bomb what? (ship, plane, land unit, efficiency, commodities) ",
("Bomb what? (ship, plane, land unit, efficiency, commodities) ", buf);
buf);
if (p == 0 || *p == 0) { if (p == 0 || *p == 0) {
if (player->aborted) if (player->aborted)
return; return;
@ -598,8 +597,7 @@ ship_bomb(struct emp_qelem *list, struct sctstr *target)
sprintf(msg, "Flak! Firing %d guns from ship %s\n", sprintf(msg, "Flak! Firing %d guns from ship %s\n",
flak, prship(&ship)); flak, prship(&ship));
PR(ship.shp_own, msg); PR(ship.shp_own, msg);
if (pinflak_planedamage if (pinflak_planedamage(&plp->plane, plp->pcp, ship.shp_own, flak))
(&plp->plane, plp->pcp, ship.shp_own, flak))
continue; continue;
} }
@ -838,8 +836,7 @@ land_bomb(struct emp_qelem *list, struct sctstr *target)
"Flak! Firing flak guns from unit %s (aa rating %d)\n", "Flak! Firing flak guns from unit %s (aa rating %d)\n",
prland(&land), land.lnd_aaf); prland(&land), land.lnd_aaf);
PR(land.lnd_own, msg); PR(land.lnd_own, msg);
if (pinflak_planedamage if (pinflak_planedamage(&plp->plane, plp->pcp, land.lnd_own, flak))
(&plp->plane, plp->pcp, land.lnd_own, flak))
continue; continue;
} }

View file

@ -108,10 +108,8 @@ coll(void)
owed *= loan.l_amtdue; owed *= loan.l_amtdue;
/* End overflow fix */ /* End overflow fix */
pr("You are owed $%.2f on that loan.\n", owed); pr("You are owed $%.2f on that loan.\n", owed);
if (! if (!(p = getstarg(player->argp[2],
(p = "What sector do you wish to confiscate? ", buf)))
getstarg(player->argp[2],
"What sector do you wish to confiscate? ", buf)))
return RET_SYN; return RET_SYN;
if (!check_loan_ok(&loan)) if (!check_loan_ok(&loan))
return RET_FAIL; return RET_FAIL;

View file

@ -51,11 +51,9 @@ decl(void)
s_char *p; s_char *p;
s_char buf[1024]; s_char buf[1024];
if (! if (!(p = getstarg(player->argp[1],
(p = "alliance, friendly, neutrality, hostility, or war? ",
getstarg(player->argp[1], buf)))
"alliance, friendly, neutrality, hostility, or war? ",
buf)))
return RET_SYN; return RET_SYN;
switch (*p) { switch (*p) {
case 'a': case 'a':

View file

@ -64,14 +64,11 @@ demo(void)
cash = natp->nat_money; cash = natp->nat_money;
if (!snxtsct(&nstr, player->argp[1])) if (!snxtsct(&nstr, player->argp[1]))
return RET_SYN; return RET_SYN;
if ((p = if (!(p = getstarg(player->argp[2], "Number to de-mobilize : ", buf)))
getstarg(player->argp[2], "Number to de-mobilize : ", buf)) == 0)
return RET_SYN; return RET_SYN;
number = atoi(p); number = atoi(p);
if (! if (!(p = getstarg(player->argp[3],
(p = "New civilians on active reserve? (y/n) ", buf)))
getstarg(player->argp[3],
"New civilians on active reserve? (y/n) ", buf)))
return RET_SYN; return RET_SYN;
if (*p != 'y' && *p != 'n') if (*p != 'y' && *p != 'n')
return RET_SYN; return RET_SYN;

View file

@ -72,8 +72,8 @@ drop(void)
wantflags = 0; wantflags = 0;
if (!snxtitem(&ni_bomb, EF_PLANE, player->argp[1])) if (!snxtitem(&ni_bomb, EF_PLANE, player->argp[1]))
return RET_SYN; return RET_SYN;
if (!snxtitem if (!snxtitem(&ni_esc, EF_PLANE,
(&ni_esc, EF_PLANE, getstarg(player->argp[2], "escort(s)? ", buf))) getstarg(player->argp[2], "escort(s)? ", buf)))
pr("No escorts...\n"); pr("No escorts...\n");
if ((p = getstarg(player->argp[3], "assembly point? ", buf)) == 0 if ((p = getstarg(player->argp[3], "assembly point? ", buf)) == 0
|| *p == 0) || *p == 0)

View file

@ -76,8 +76,8 @@ fly(void)
wantflags = 0; wantflags = 0;
if (!snxtitem(&ni_bomb, EF_PLANE, player->argp[1])) if (!snxtitem(&ni_bomb, EF_PLANE, player->argp[1]))
return RET_SYN; return RET_SYN;
if (!snxtitem if (!snxtitem(&ni_esc, EF_PLANE,
(&ni_esc, EF_PLANE, getstarg(player->argp[2], "escort(s)? ", buf))) getstarg(player->argp[2], "escort(s)? ", buf)))
pr("No escorts...\n"); pr("No escorts...\n");
if ((p = getstarg(player->argp[3], "assembly point? ", buf)) == 0 if ((p = getstarg(player->argp[3], "assembly point? ", buf)) == 0
|| *p == 0) || *p == 0)

View file

@ -225,9 +225,8 @@ fuel(void)
if (!player->argp[4]) if (!player->argp[4])
pr("%s is not in a supplied, efficient harbor\n", pr("%s is not in a supplied, efficient harbor\n",
prship(&item.ship)); prship(&item.ship));
if (!snxtitem if (!snxtitem (&tender, EF_SHIP,
(&tender, EF_SHIP, getstarg(player->argp[4], "Oiler? ", buf)))
getstarg(player->argp[4], "Oiler? ", buf)))
continue; continue;
if (!check_ship_ok(&item.ship)) if (!check_ship_ok(&item.ship))

View file

@ -217,9 +217,8 @@ launch_as(struct plnstr *pp)
pr("No satellites there!\n"); pr("No satellites there!\n");
return -1; return -1;
} }
if (msl_hit if (msl_hit(pp, plane.pln_def, EF_PLANE, N_SAT_KILL, N_SAT_KILL,
(pp, plane.pln_def, EF_PLANE, N_SAT_KILL, N_SAT_KILL, prplane(&plane), sx, sy, plane.pln_own)) {
prplane(&plane), sx, sy, plane.pln_own)) {
dam = pln_damage(pp, sx, sy, 'p', &nukedam, 1); dam = pln_damage(pp, sx, sy, 'p', &nukedam, 1);
oldown = plane.pln_own; oldown = plane.pln_own;
planedamage(&plane, dam); planedamage(&plane, dam);

View file

@ -393,8 +393,8 @@ load_plane_ship(struct sctstr *sectp, struct shpstr *sp, int noisy,
} }
sprintf(prompt, "Plane(s) to %s %s? ", sprintf(prompt, "Plane(s) to %s %s? ",
load_unload == LOAD ? "load onto" : "unload from", prship(sp)); load_unload == LOAD ? "load onto" : "unload from", prship(sp));
if (!snxtitem if (!snxtitem(&ni, EF_PLANE,
(&ni, EF_PLANE, p = getstarg(player->argp[3], prompt, buf))) p = getstarg(player->argp[3], prompt, buf)))
return RET_SYN; return RET_SYN;
if (!still_ok_ship(sectp, sp)) if (!still_ok_ship(sectp, sp))
@ -538,8 +538,8 @@ load_land_ship(struct sctstr *sectp, struct shpstr *sp, int noisy,
} }
sprintf(prompt, "Land unit(s) to %s %s? ", sprintf(prompt, "Land unit(s) to %s %s? ",
load_unload == LOAD ? "load onto" : "unload from", prship(sp)); load_unload == LOAD ? "load onto" : "unload from", prship(sp));
if (!snxtitem if (!snxtitem(&ni, EF_LAND,
(&ni, EF_LAND, p = getstarg(player->argp[3], prompt, buf))) p = getstarg(player->argp[3], prompt, buf)))
return RET_SYN; return RET_SYN;
if (!still_ok_ship(sectp, sp)) if (!still_ok_ship(sectp, sp))
@ -858,8 +858,8 @@ load_plane_land(struct sctstr *sectp, struct lndstr *lp, int noisy,
} }
sprintf(prompt, "Plane(s) to %s %s? ", sprintf(prompt, "Plane(s) to %s %s? ",
load_unload == LOAD ? "load onto" : "unload from", prland(lp)); load_unload == LOAD ? "load onto" : "unload from", prland(lp));
if (!snxtitem if (!snxtitem(&ni, EF_PLANE,
(&ni, EF_PLANE, p = getstarg(player->argp[3], prompt, buf))) p = getstarg(player->argp[3], prompt, buf)))
return RET_SYN; return RET_SYN;
if (!still_ok_land(sectp, lp)) if (!still_ok_land(sectp, lp))
@ -1085,8 +1085,8 @@ load_land_land(struct sctstr *sectp, struct lndstr *lp, int noisy,
} }
sprintf(prompt, "Land unit(s) to %s %s? ", sprintf(prompt, "Land unit(s) to %s %s? ",
load_unload == LOAD ? "load onto" : "unload from", prland(lp)); load_unload == LOAD ? "load onto" : "unload from", prland(lp));
if (!snxtitem if (!snxtitem(&ni, EF_LAND,
(&ni, EF_LAND, p = getstarg(player->argp[3], prompt, buf))) p = getstarg(player->argp[3], prompt, buf)))
return RET_SYN; return RET_SYN;
if (!still_ok_land(sectp, lp)) if (!still_ok_land(sectp, lp))

View file

@ -75,8 +75,8 @@ ltend(void)
if (!(ip = whatitem(player->argp[1], "Transfer what commodity? "))) if (!(ip = whatitem(player->argp[1], "Transfer what commodity? ")))
return RET_SYN; return RET_SYN;
if (!snxtitem if (!snxtitem(&tenders, EF_SHIP,
(&tenders, EF_SHIP, getstarg(player->argp[2], "Tender(s)? ", buf))) getstarg(player->argp[2], "Tender(s)? ", buf)))
return RET_SYN; return RET_SYN;
while (nxtitem(&tenders, (s_char *)&tender)) { while (nxtitem(&tenders, (s_char *)&tender)) {
if (!player->owner) if (!player->owner)

View file

@ -829,8 +829,7 @@ quiet_bigdef(int attacker, struct emp_qelem *list, natid own, natid aown,
range = mapdist(ship.shp_x, ship.shp_y, ax, ay); range = mapdist(ship.shp_x, ship.shp_y, ax, ay);
if (range > erange) if (range > erange)
continue; continue;
if (!line_of_sight if (!line_of_sight((s_char **)0, ship.shp_x, ship.shp_y, ax, ay))
((s_char **)0, ship.shp_x, ship.shp_y, ax, ay))
continue; continue;
(*nfiring)++; (*nfiring)++;

View file

@ -413,10 +413,9 @@ would_abandon(struct sctstr *sp, int vtype, int amnt, struct lndstr *lp)
loyalcivs = 0; loyalcivs = 0;
/* If they have a military unit there, they still own it */ /* If they have a military unit there, they still own it */
if (sp->sct_own != 0 && ((loyalcivs == 0) && (mil == 0) && if (sp->sct_own != 0
(has_units && ((loyalcivs == 0) && (mil == 0)
(sp->sct_x, sp->sct_y, sp->sct_own, && (has_units(sp->sct_x, sp->sct_y, sp->sct_own, lp) == 0)))
lp) == 0)))
return 1; return 1;
return 0; return 0;

View file

@ -77,8 +77,8 @@ para(void)
wantflags = P_P; wantflags = P_P;
if (!snxtitem(&ni_bomb, EF_PLANE, player->argp[1])) if (!snxtitem(&ni_bomb, EF_PLANE, player->argp[1]))
return RET_SYN; return RET_SYN;
if (!snxtitem if (!snxtitem(&ni_esc, EF_PLANE,
(&ni_esc, EF_PLANE, getstarg(player->argp[2], "escort(s)? ", buf))) getstarg(player->argp[2], "escort(s)? ", buf)))
pr("No escorts...\n"); pr("No escorts...\n");
if ((p = getstarg(player->argp[3], "assembly point? ", buf)) == 0 if ((p = getstarg(player->argp[3], "assembly point? ", buf)) == 0
|| *p == 0) || *p == 0)

View file

@ -71,8 +71,8 @@ reco(void)
wantflags = 0; wantflags = 0;
if (!snxtitem(&ni_bomb, EF_PLANE, player->argp[1])) if (!snxtitem(&ni_bomb, EF_PLANE, player->argp[1]))
return RET_SYN; return RET_SYN;
if (!snxtitem if (!snxtitem(&ni_esc, EF_PLANE,
(&ni_esc, EF_PLANE, getstarg(player->argp[2], "escort(s)? ", buf))) getstarg(player->argp[2], "escort(s)? ", buf)))
pr("No escorts...\n"); pr("No escorts...\n");
if ((p = getstarg(player->argp[3], "assembly point? ", buf)) == 0 if ((p = getstarg(player->argp[3], "assembly point? ", buf)) == 0
|| *p == 0) || *p == 0)

View file

@ -204,29 +204,22 @@ printdiff(int mystat, double ours, struct natstr *natp, int what)
if (tolerance > 2 * ours) if (tolerance > 2 * ours)
tolerance = (int)(2 * ours); tolerance = (int)(2 * ours);
if (check(buf, theirs, 2 * ours, -1.0, shift, what, tolerance)) ; if (check(buf, theirs, 2 * ours, -1.0, shift, what, tolerance)) ;
else if (check else if (check(buf, theirs, 1.5 * ours, 2.0 * ours, shift, what,
(buf, theirs, 1.5 * ours, 2.0 * ours, shift, what, tolerance)) ;
else if (check(buf, theirs, 1.2 * ours, 1.5 * ours, shift, what,
tolerance)) ; tolerance)) ;
else if (check else if (check(buf, theirs, 1.1 * ours, 1.2 * ours, shift, what,
(buf, theirs, 1.2 * ours, 1.5 * ours, shift, what, tolerance)) ;
tolerance)) ; else if (check(buf, theirs, ours / 1.1, 1.1 * ours, shift, what,
else if (check tolerance)) ;
(buf, theirs, 1.1 * ours, 1.2 * ours, shift, what, else if (check(buf, theirs, ours / 1.2, ours / 1.1, shift, what,
tolerance)) ; tolerance)) ;
else if (check else if (check(buf, theirs, ours / 1.5, ours / 1.2, shift, what,
(buf, theirs, ours / 1.1, 1.1 * ours, shift, what, tolerance)) ;
tolerance)) ; else if (check(buf, theirs, ours / 2.0, ours / 1.5, shift, what,
else if (check tolerance)) ;
(buf, theirs, ours / 1.2, ours / 1.1, shift, what, else if (check(buf, theirs, -1.0, ours / 2.0, shift, what,
tolerance)) ; tolerance)) ;
else if (check
(buf, theirs, ours / 1.5, ours / 1.2, shift, what,
tolerance)) ;
else if (check
(buf, theirs, ours / 2.0, ours / 1.5, shift, what,
tolerance)) ;
else if (check
(buf, theirs, -1.0, ours / 2.0, shift, what, tolerance)) ;
else else
sprintf(buf, " n/a"); sprintf(buf, " n/a");
} else } else

View file

@ -68,8 +68,7 @@ swaps(void)
!getsect(sectb.sct_x, sectb.sct_y, &sectb)) !getsect(sectb.sct_x, sectb.sct_y, &sectb))
return RET_SYN; return RET_SYN;
print_res(&sectb); print_res(&sectb);
if (!confirm if (!confirm ("Are you sure these are the two sectors you wish to swap? "))
("Are you sure these are the two sectors you wish to swap? "))
return RET_FAIL; return RET_FAIL;
/* save x and y from secta */ /* save x and y from secta */
x = secta.sct_x; x = secta.sct_x;

View file

@ -87,8 +87,8 @@ tend(void)
return RET_SYN; return RET_SYN;
} }
if (!snxtitem if (!snxtitem(&tenders, EF_SHIP,
(&tenders, EF_SHIP, getstarg(player->argp[2], "Tender(s)? ", buf))) getstarg(player->argp[2], "Tender(s)? ", buf)))
return RET_SYN; return RET_SYN;
while (nxtitem(&tenders, (s_char *)&tender)) { while (nxtitem(&tenders, (s_char *)&tender)) {

View file

@ -330,8 +330,7 @@ check_trade(void)
continue; continue;
} }
if (tg.gen.trg_own != trade.trd_owner) { if (tg.gen.trg_own != trade.trd_owner) {
logerror logerror("Something weird, tg.gen.trg_own != trade.trd_owner!\n");
("SOmething weird, tg.gen.trg_own != trade.trd_owner!\n");
trade.trd_unitid = -1; trade.trd_unitid = -1;
puttrade(n, &trade); puttrade(n, &trade);
continue; continue;

View file

@ -204,8 +204,8 @@ bestownedpath(s_char *bpath,
tx = XNORM(tx); tx = XNORM(tx);
ty = YNORM(ty); ty = YNORM(ty);
if (mapindex[tx][ty] == 0xFFFF) { if (mapindex[tx][ty] == 0xFFFF) {
if (owned_and_navigable if (owned_and_navigable(bigmap, tx, ty,
(bigmap, tx, ty, terrain, own) terrain, own)
|| (tx == ex && ty == ey && !restr2)) { || (tx == ex && ty == ey && !restr2)) {
mapindex[tx][ty] = mapindex[tx][ty] =
((i + 1) << 13) + routelen; ((i + 1) << 13) + routelen;

View file

@ -294,9 +294,8 @@ ef_write(int type, int id, caddr_t ptr)
} }
if (id >= ep->fids) { if (id >= ep->fids) {
if (ep->flags & EFF_MEM) { if (ep->flags & EFF_MEM) {
logerror logerror("file %s went beyond %d items; won't be able toread item w/o restart",
("file %s went beyond %d items; won't be able toread item w/o restart", ep->name, ep->fids);
ep->name, ep->fids);
} else { } else {
/* write expanded file; ep->fids = last id + 1 */ /* write expanded file; ep->fids = last id + 1 */
ep->fids = id + 1; ep->fids = id + 1;

View file

@ -448,8 +448,7 @@ lwpInitSystem(int pri, char **ctxptr, int flags)
if (pri < 1) if (pri < 1)
pri = 1; pri = 1;
/* *LwpContextPtr = 0; */ /* *LwpContextPtr = 0; */
if (! if (!(LwpCurrent = calloc(1, sizeof(struct lwpProc))))
(LwpCurrent = (struct lwpProc *)calloc(1, sizeof(struct lwpProc))))
return (0); return (0);
if (!(stack = (int *)malloc(64))) if (!(stack = (int *)malloc(64)))
return (0); return (0);

View file

@ -226,8 +226,7 @@ player_accept(void *unused)
exit(1); exit(1);
} }
#else #else
logerror logerror("Alpha/Linux? You don't support SO_REUSEADDR yet, do you?\n");
("Alpha/Linux? You don't support SO_REUSEADDR yet, do you?\n");
#endif #endif
if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) { if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
logerror("inet socket bind"); logerror("inet socket bind");

View file

@ -578,9 +578,7 @@ att_abort(int combat_mode, struct combat *off, struct combat *def)
&& (sect.sct_oldown != player->cnum) && (sect.sct_oldown != player->cnum)
&& (issneak != SITZKRIEG) && (issneak != MOBILIZATION)) { && (issneak != SITZKRIEG) && (issneak != MOBILIZATION)) {
pr("You're not at war with them!\n"); pr("You're not at war with them!\n");
if (!confirm if (!confirm("Do you really want to sneak attack (it will cost you $5000) [yn]? ")) {
("Do you really want to sneak attack (it will cost you $5000) [yn]? "))
{
pr("Sneak attack cancelled!\n"); pr("Sneak attack cancelled!\n");
return abort_attack(); return abort_attack();
} }
@ -779,36 +777,29 @@ att_ask_support(int offset, int *fortp, int *shipp, int *landp,
*fortp = *shipp = 0; *fortp = *shipp = 0;
*landp = *planep = 0; *landp = *planep = 0;
if (! if (!(p = getstarg(player->argp[offset], "Use fort support? ",
(p = buf)))
getstarg(player->argp[offset], "Use fort support? ", buf)))
return RET_SYN; return RET_SYN;
if ((*p == 'y') || (*p == 'Y')) if ((*p == 'y') || (*p == 'Y'))
*fortp = 1; *fortp = 1;
if (! if (!(p = getstarg(player->argp[offset + 1], "Use ship support? ",
(p = buf)))
getstarg(player->argp[offset + 1], "Use ship support? ",
buf)))
return RET_SYN; return RET_SYN;
if ((*p == 'y') || (*p == 'Y')) if ((*p == 'y') || (*p == 'Y'))
*shipp = 1; *shipp = 1;
if (! if (!(p = getstarg(player->argp[offset + 2], "Use land support? ",
(p = buf)))
getstarg(player->argp[offset + 2], "Use land support? ",
buf)))
return RET_SYN; return RET_SYN;
if ((*p == 'y') || (*p == 'Y')) if ((*p == 'y') || (*p == 'Y'))
*landp = 1; *landp = 1;
if (! if (!p = getstarg(player->argp[offset + 3], "Use plane support? ",
(p = buf)))
getstarg(player->argp[offset + 3], "Use plane support? ",
buf)))
return RET_SYN; return RET_SYN;
if ((*p == 'y') || (*p == 'Y')) if ((*p == 'y') || (*p == 'Y'))
@ -1597,10 +1588,7 @@ att_reacting_units(struct combat *def, struct emp_qelem *list, int a_spy,
continue; continue;
getsect(def->x, def->y, &dsect); getsect(def->x, def->y, &dsect);
if (! if (!(p = BestLandPath(buf, &sect, &dsect, &move_cost, MOB_ROAD)))
(p =
(s_char *)BestLandPath(buf, &sect, &dsect, &move_cost,
MOB_ROAD)))
continue; continue;
mobcost = land.lnd_effic * 0.01 * lchr[(int)land.lnd_type].l_spd; mobcost = land.lnd_effic * 0.01 * lchr[(int)land.lnd_type].l_spd;

View file

@ -109,11 +109,10 @@ pln_onewaymission(struct sctstr *target, int *shipno, int *flagp)
if (!(p = getstarg(0, "Carrier #? ", buf)) || !*p) if (!(p = getstarg(0, "Carrier #? ", buf)) || !*p)
break; break;
n = atoi(p); n = atoi(p);
if (n < 0 || !getship(n, &ship) || (!player->owner && if (n < 0 || !getship(n, &ship)
(getrel || (!player->owner
(getnatp(ship.shp_own), && (getrel(getnatp(ship.shp_own), player->cnum)
player->cnum) != != ALLIED))) {
ALLIED))) {
pr("Not yours\n"); pr("Not yours\n");
continue; continue;
} }

View file

@ -82,13 +82,11 @@ shutdown_sequence(void *unused)
shutdown_pending); shutdown_pending);
} else if (shutdown_pending <= 60 } else if (shutdown_pending <= 60
&& shutdown_pending % 10 == 0) { && shutdown_pending % 10 == 0) {
pr_wall pr_wall("%sThe server will be shutting down in %d minutes!\n",
("%sThe server will be shutting down in %d minutes!\n", header, shutdown_pending);
header, shutdown_pending);
} else if (shutdown_pending % 60 == 0) { } else if (shutdown_pending % 60 == 0) {
pr_wall pr_wall("%sThe server will be shutting down %d hours from now.\n",
("%sThe server will be shutting down %d hours from now.\n", header, (int)(shutdown_pending / 60));
header, (int)(shutdown_pending / 60));
} }
} }
empth_sleep(now + 60); empth_sleep(now + 60);

View file

@ -112,9 +112,8 @@ s_char **argv;
int big; int big;
if (argc > 1 && argc != 6) { if (argc > 1 && argc != 6) {
printf printf("usage: %s sectrange mincontdist chunksize numchunks numisle\n",
("usage: %s sectrange mincontdist chunksize numchunks numisle\n", *argv);
*argv);
return -1; return -1;
} }
if (argc == 6) { if (argc == 6) {