Break long lines more tastefully
This commit is contained in:
parent
373651359e
commit
7465574195
28 changed files with 69 additions and 92 deletions
|
@ -129,8 +129,7 @@ info(void)
|
|||
pr(".\n");
|
||||
return RET_FAIL;
|
||||
}
|
||||
snprintf(filename, sizeof(filename), "%s/%s", infodir,
|
||||
last);
|
||||
snprintf(filename, sizeof(filename), "%s/%s", infodir, last);
|
||||
fp = fopen(filename, "r");
|
||||
if (fp == NULL) {
|
||||
pr("Error reading info file for %s\n", name);
|
||||
|
@ -210,8 +209,7 @@ apro(void)
|
|||
while ((dp = readdir(info_dp))) {
|
||||
if (dp->d_name[0] == '.')
|
||||
continue;
|
||||
snprintf(filename, sizeof(filename), "%s/%s", infodir,
|
||||
dp->d_name);
|
||||
snprintf(filename, sizeof(filename), "%s/%s", infodir, dp->d_name);
|
||||
fp = fopen(filename, "r");
|
||||
alreadyhit = 0;
|
||||
nll = nlhl = 0;
|
||||
|
@ -357,8 +355,7 @@ info(void)
|
|||
pr(".\n");
|
||||
return RET_FAIL;
|
||||
}
|
||||
snprintf(filename, sizeof(filename), "%s/%s",
|
||||
infodir, last);
|
||||
snprintf(filename, sizeof(filename), "%s/%s", infodir, last);
|
||||
fp = fopen(filename, "rb");
|
||||
if (fp == NULL) {
|
||||
pr("Error reading info file for %s\n", name);
|
||||
|
|
|
@ -201,8 +201,7 @@ launch_missile(struct plnstr *pp)
|
|||
return RET_FAIL;
|
||||
}
|
||||
n = atoi(cp);
|
||||
if ((n < 0) || !getship(n, &target_ship) ||
|
||||
!target_ship.shp_own) {
|
||||
if ((n < 0) || !getship(n, &target_ship) || !target_ship.shp_own) {
|
||||
pr("Bad ship number!\n");
|
||||
return RET_FAIL;
|
||||
}
|
||||
|
|
|
@ -106,8 +106,7 @@ ltend(void)
|
|||
continue;
|
||||
ontarget = target.lnd_item[ip->i_uid];
|
||||
if (ontarget == 0 && amt < 0) {
|
||||
pr("No %s on %s\n",
|
||||
ip->i_name, prland(&target));
|
||||
pr("No %s on %s\n", ip->i_name, prland(&target));
|
||||
continue;
|
||||
}
|
||||
lbase = &lchr[(int)target.lnd_type];
|
||||
|
|
|
@ -75,8 +75,7 @@ nati(void)
|
|||
pr("%d%% eff %s at %s has %d civilian%s & %d military\n",
|
||||
sect.sct_effic,
|
||||
sect.sct_type == SCT_CAPIT ? "capital" : "mountain capital",
|
||||
xyas(sect.sct_x, sect.sct_y, cnum), civ, splur(civ),
|
||||
mil);
|
||||
xyas(sect.sct_x, sect.sct_y, cnum), civ, splur(civ), mil);
|
||||
}
|
||||
}
|
||||
pr(" The treasury has $%.2f", (double)natp->nat_money);
|
||||
|
|
|
@ -108,8 +108,7 @@ do_unit_move(struct emp_qelem *ulist, int *together,
|
|||
else
|
||||
lnd_mar(ulist, minmob, maxmob, together, player->cnum);
|
||||
if (QEMPTY(ulist)) {
|
||||
pr("No %s left\n",
|
||||
type == EF_SHIP ? "ships" : "lands");
|
||||
pr("No %s left\n", type == EF_SHIP ? "ships" : "lands");
|
||||
if (type == EF_SHIP && strlen(pathtaken) > 1) {
|
||||
pathtaken[strlen(pathtaken) - 1] = '\0';
|
||||
pr("Path taken: %s\n", pathtaken);
|
||||
|
@ -140,8 +139,7 @@ do_unit_move(struct emp_qelem *ulist, int *together,
|
|||
else
|
||||
lnd_mar(ulist, minmob, maxmob, together, player->cnum);
|
||||
if (QEMPTY(ulist)) {
|
||||
pr("No %s left\n",
|
||||
type == EF_SHIP ? "ships" : "lands");
|
||||
pr("No %s left\n", type == EF_SHIP ? "ships" : "lands");
|
||||
if (type == EF_SHIP && strlen(pathtaken) > 1) {
|
||||
pathtaken[strlen(pathtaken) - 1] = '\0';
|
||||
pr("Path taken: %s\n", pathtaken);
|
||||
|
|
|
@ -198,8 +198,7 @@ orde(void)
|
|||
i1 = whatitem(player->argp[5], "Commodity? ");
|
||||
if (!i1)
|
||||
return RET_FAIL;
|
||||
p1 = getstarg(player->argp[6], "Amount? ",
|
||||
buf);
|
||||
p1 = getstarg(player->argp[6], "Amount? ", buf);
|
||||
if (!p1)
|
||||
return RET_SYN;
|
||||
if (!check_ship_ok(&ship))
|
||||
|
@ -218,8 +217,7 @@ orde(void)
|
|||
i1 = whatitem(player->argp[5], "Commodity? ");
|
||||
if (!i1)
|
||||
return RET_FAIL;
|
||||
p1 = getstarg(player->argp[6], "Amount? ",
|
||||
buf);
|
||||
p1 = getstarg(player->argp[6], "Amount? ", buf);
|
||||
if (!p1)
|
||||
return RET_SYN;
|
||||
if (!check_ship_ok(&ship))
|
||||
|
|
|
@ -121,8 +121,7 @@ radar(int type)
|
|||
tech = WORLD_Y / 2.0;
|
||||
if (tech > WORLD_X / 4.0)
|
||||
tech = WORLD_X / 4.0;
|
||||
radmap(item.gen.x, item.gen.y, item.gen.effic,
|
||||
(int)tech, tf);
|
||||
radmap(item.gen.x, item.gen.y, item.gen.effic, (int)tech, tf);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -61,8 +61,7 @@ upda(void)
|
|||
pr("The current time is %19.19s.\n\n", ctime(&now));
|
||||
|
||||
if (next && update_window) {
|
||||
pr("The next update window starts at %19.19s.\n",
|
||||
ctime(&next));
|
||||
pr("The next update window starts at %19.19s.\n", ctime(&next));
|
||||
stop = next + update_window;
|
||||
pr("The next update window stops at %19.19s.\n", ctime(&stop));
|
||||
}
|
||||
|
@ -74,8 +73,7 @@ upda(void)
|
|||
case UPD_DEMAND_SCHED:
|
||||
pr("Demand updates occur at update CHECK times.\n");
|
||||
if (next) {
|
||||
pr("The next update check is at %19.19s.\n",
|
||||
ctime(&next));
|
||||
pr("The next update check is at %19.19s.\n", ctime(&next));
|
||||
}
|
||||
pr("Demand updates require %d country(s) to want one.\n",
|
||||
update_wantmin);
|
||||
|
|
|
@ -146,8 +146,7 @@ lupgr(void)
|
|||
if (land.lnd_own != player->cnum)
|
||||
wu(0, land.lnd_own,
|
||||
"%s upgraded by %s to tech %d, at a cost of %d\n",
|
||||
prland(&land), cname(player->cnum), land.lnd_tech,
|
||||
cost);
|
||||
prland(&land), cname(player->cnum), land.lnd_tech, cost);
|
||||
}
|
||||
if (n == 0) {
|
||||
pr("No land units\n");
|
||||
|
@ -228,8 +227,7 @@ supgr(void)
|
|||
if (ship.shp_own != player->cnum)
|
||||
wu(0, ship.shp_own,
|
||||
"%s upgraded by %s to tech %d, at a cost of %d\n",
|
||||
prship(&ship), cname(player->cnum), ship.shp_tech,
|
||||
cost);
|
||||
prship(&ship), cname(player->cnum), ship.shp_tech, cost);
|
||||
}
|
||||
if (n == 0) {
|
||||
pr("No ships\n");
|
||||
|
@ -317,8 +315,7 @@ pupgr(void)
|
|||
if (plane.pln_own != player->cnum)
|
||||
wu(0, plane.pln_own,
|
||||
"%s upgraded by %s to tech %d, at a cost of %d\n",
|
||||
prplane(&plane), cname(player->cnum), plane.pln_tech,
|
||||
cost);
|
||||
prplane(&plane), cname(player->cnum), plane.pln_tech, cost);
|
||||
}
|
||||
if (n == 0) {
|
||||
pr("No planes.\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue