Code formatting. No functional changes.
This commit is contained in:
parent
b0a5d11a3f
commit
4c6fb12377
7 changed files with 11 additions and 12 deletions
|
@ -129,7 +129,7 @@ struct as_frompath {
|
|||
* Some cheezy allocation macros.
|
||||
*/
|
||||
#define AS_NEW_ARRAY(p, type, n, err) \
|
||||
(p) = (type *)calloc((n), sizeof (*(p))); \
|
||||
(p) = (type *)calloc((n), sizeof(*(p))); \
|
||||
if ((p) == NULL) \
|
||||
return err; \
|
||||
|
||||
|
|
|
@ -221,8 +221,7 @@ launch_as(struct plnstr *pp)
|
|||
oldown = plane.pln_own;
|
||||
planedamage(&plane, dam);
|
||||
pr("Hit satellite for %d%% damage!\n", dam);
|
||||
mpr(oldown,
|
||||
"%s anti-sat did %d%% damage to %s over %s\n",
|
||||
mpr(oldown, "%s anti-sat did %d%% damage to %s over %s\n",
|
||||
cname(player->cnum), dam, prplane(&plane),
|
||||
xyas(plane.pln_x, plane.pln_y, plane.pln_own));
|
||||
putplane(plane.pln_uid, &plane);
|
||||
|
|
|
@ -296,13 +296,11 @@ plane_sona(struct emp_qelem *plane_list, int x, int y,
|
|||
mpr(pp->pln_own, "sub #%d %s\n", targ->shp_uid,
|
||||
xyas(targ->shp_x, targ->shp_y, pp->pln_own));
|
||||
else
|
||||
mpr(pp->pln_own,
|
||||
"%s %s\n",
|
||||
mpr(pp->pln_own, "%s %s\n",
|
||||
prship(targ),
|
||||
xyas(targ->shp_x, targ->shp_y, pp->pln_own));
|
||||
else
|
||||
mpr(pp->pln_own,
|
||||
"%s %s @ %s\n", cname(targ->shp_own),
|
||||
mpr(pp->pln_own, "%s %s @ %s\n", cname(targ->shp_own),
|
||||
prship(targ),
|
||||
xyas(targ->shp_x, targ->shp_y, pp->pln_own));
|
||||
}
|
||||
|
|
|
@ -81,7 +81,6 @@ trad(void)
|
|||
int q;
|
||||
s_char buf[1024];
|
||||
|
||||
|
||||
if (!opt_MARKET) {
|
||||
pr("The market is disabled.\n");
|
||||
return RET_FAIL;
|
||||
|
|
|
@ -126,7 +126,10 @@ xdprval(struct valstr *val, char *sep)
|
|||
l = s + val->val_as.str.maxsz;
|
||||
/* FIXME maxsz == INT_MAX ! */
|
||||
for (;;) {
|
||||
for (e=s; e<l && *e != '"' && *e != '\\' && isgraph(*e); ++e) ;
|
||||
for (e = s;
|
||||
e < l && *e != '"' && *e != '\\' && isgraph(*e);
|
||||
++e)
|
||||
;
|
||||
pr("%.*s", (int)(e-s), s);
|
||||
if (e < l && *e)
|
||||
pr("\\%03o", *e++);
|
||||
|
|
|
@ -190,8 +190,7 @@ detonate(struct plnstr *pp, int x, int y)
|
|||
xyas(plane.pln_x, plane.pln_y, own), damage);
|
||||
} else {
|
||||
if (own != 0)
|
||||
mpr(own,
|
||||
"%s nuclear device did %d%% damage to %s at %s\n",
|
||||
mpr(own, "%s nuclear device did %d%% damage to %s at %s\n",
|
||||
cname(bombown), damage,
|
||||
prplane(&plane), xyas(plane.pln_x, plane.pln_y, own));
|
||||
}
|
||||
|
|
|
@ -762,7 +762,8 @@ pln_put(struct emp_qelem *list)
|
|||
not sunk. */
|
||||
if (ship.shp_effic < SHIP_MINEFF) {
|
||||
mpr(pp->pln_own,
|
||||
"Ship #%d has been sunk, plane #%d has nowhere to land, and\nsplashes into the sea.\n",
|
||||
"Ship #%d has been sunk, plane #%d has nowhere to land, and\n"
|
||||
"splashes into the sea.\n",
|
||||
pp->pln_ship, pp->pln_uid);
|
||||
pp->pln_effic = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue