Coding style fixes, mostly indentation and whitespace
This commit is contained in:
parent
8a0d117d45
commit
373651359e
47 changed files with 131 additions and 130 deletions
|
@ -85,9 +85,9 @@ cens(void)
|
|||
n = sect.sct_dist[I_FOOD] % 1000;
|
||||
pr("%c ", n == 0 ? '.' : '0' + (n / 100));
|
||||
if (sect.sct_own != sect.sct_oldown)
|
||||
pr("%3d", sect.sct_oldown);
|
||||
pr("%3d", sect.sct_oldown);
|
||||
else
|
||||
pr(" ");
|
||||
pr(" ");
|
||||
|
||||
pr("%5d", sect.sct_item[I_CIVIL]);
|
||||
pr("%5d", sect.sct_item[I_MILIT]);
|
||||
|
|
|
@ -386,7 +386,7 @@ pr_ship(struct shpstr *ship)
|
|||
pr("Fleet <F>: %.1s\n", &ship->shp_fleet);
|
||||
pr("Retreat path <R>: '%s'\t\tRetreat Flags <W>: %d\n",
|
||||
ship->shp_rpath, ship->shp_rflags);
|
||||
pr("Plague Stage <a>: %d\t\t",ship->shp_pstage);
|
||||
pr("Plague Stage <a>: %d\t\t", ship->shp_pstage);
|
||||
pr("Plague Time <b>: %d\n", ship->shp_ptime);
|
||||
pr("civ mil uw food shl gun pet irn dst oil lcm hcm rad\n");
|
||||
pr(" c m u f s g p i d o l h r\n");
|
||||
|
|
|
@ -82,7 +82,7 @@ fort(void)
|
|||
if (hard_amt <= 0)
|
||||
continue;
|
||||
|
||||
if (lnd_fortify (&land, hard_amt) <= 0) {
|
||||
if (lnd_fortify(&land, hard_amt) <= 0) {
|
||||
pr("%s can't be fortified%s\n", prland(&land),
|
||||
land.lnd_harden >= land_mob_max ? " any further" : "");
|
||||
continue;
|
||||
|
|
|
@ -320,7 +320,7 @@ info(void)
|
|||
default:
|
||||
pr("Error reading info dir\n");
|
||||
logerror("Error (%lu) reading info dir(%s)\\file(%s)",
|
||||
GetLastError(), infodir, filename);
|
||||
GetLastError(), infodir, filename);
|
||||
}
|
||||
return RET_FAIL;
|
||||
}
|
||||
|
@ -412,7 +412,7 @@ apro(void)
|
|||
lhitlim = 100;
|
||||
}
|
||||
|
||||
snprintf(filename, sizeof(filename), "%s\\*",infodir);
|
||||
snprintf(filename, sizeof(filename), "%s\\*", infodir);
|
||||
hDir = FindFirstFile(filename, &fData);
|
||||
if (hDir == INVALID_HANDLE_VALUE) {
|
||||
if (GetLastError() == ERROR_PATH_NOT_FOUND) {
|
||||
|
@ -421,7 +421,7 @@ apro(void)
|
|||
} else {
|
||||
pr("Error reading info dir\n");
|
||||
logerror("Error (%lu) reading info dir(%s)\\file(%s)",
|
||||
GetLastError(), infodir, filename);
|
||||
GetLastError(), infodir, filename);
|
||||
}
|
||||
return RET_FAIL;
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ apro(void)
|
|||
(fData.dwFileAttributes == FILE_ATTRIBUTE_ARCHIVE) ||
|
||||
(fData.dwFileAttributes == FILE_ATTRIBUTE_READONLY))) {
|
||||
snprintf(filename, sizeof(filename), "%s\\%s", infodir,
|
||||
fData.cFileName);
|
||||
fData.cFileName);
|
||||
fp = fopen(filename, "rb");
|
||||
alreadyhit = 0;
|
||||
nll = nlhl = 0;
|
||||
|
|
|
@ -109,7 +109,7 @@ landmine(void)
|
|||
continue;
|
||||
if (land.lnd_ship >= 0 || land.lnd_land >= 0) {
|
||||
pr("%s is on a %s\n", prland(&land),
|
||||
land. lnd_ship >= 0 ? "ship" : "land unit");
|
||||
land.lnd_ship >= 0 ? "ship" : "land unit");
|
||||
continue;
|
||||
}
|
||||
if (land.lnd_mobil < 1) {
|
||||
|
|
|
@ -125,8 +125,8 @@ do_unit_move(struct emp_qelem *ulist, int *together,
|
|||
}
|
||||
if (!skip)
|
||||
nav_map(leader->x, leader->y,
|
||||
type == EF_SHIP ?
|
||||
!(mchr[(int)leader->type].m_flags & M_SUB) : 1);
|
||||
type == EF_SHIP
|
||||
? !(mchr[(int)leader->type].m_flags & M_SUB) : 1);
|
||||
else
|
||||
skip = 0;
|
||||
sprintf(prompt, "<%.1f:%.1f: %s> ", *maxmob,
|
||||
|
@ -171,7 +171,7 @@ do_unit_move(struct emp_qelem *ulist, int *together,
|
|||
if (dir >= 0) {
|
||||
if (type == EF_SHIP) {
|
||||
stopping |= shp_nav_one_sector(ulist, dir,
|
||||
player->cnum, *together);
|
||||
player->cnum, *together);
|
||||
if (stopping != 2) {
|
||||
*pt++ = dirch[dir];
|
||||
*pt = '\0';
|
||||
|
@ -179,7 +179,7 @@ do_unit_move(struct emp_qelem *ulist, int *together,
|
|||
} else
|
||||
stopping |=
|
||||
lnd_mar_one_sector(ulist, dir, player->cnum,
|
||||
*together);
|
||||
*together);
|
||||
cp++;
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -81,8 +81,8 @@ para(void)
|
|||
pr("range to target is %d\n", ap_to_target);
|
||||
if (target.sct_own == player->cnum) {
|
||||
pr("You can't air-assault your own sector!\n");
|
||||
return RET_FAIL;
|
||||
}
|
||||
return RET_FAIL;
|
||||
}
|
||||
/*
|
||||
* select planes within range
|
||||
*/
|
||||
|
|
|
@ -264,7 +264,7 @@ pdump(void)
|
|||
case 19:
|
||||
pr(pln_is_in_orbit(&plane)
|
||||
&& (plane.pln_flags & PLN_SYNCHRONOUS)
|
||||
? " Y" : " N");
|
||||
? " Y" : " N");
|
||||
break;
|
||||
case 20:
|
||||
if (getnuke(nuk_on_plane(&plane), &nuke)) {
|
||||
|
|
|
@ -102,7 +102,7 @@ radar(int type)
|
|||
if (mchr[(int)item.ship.shp_type].m_flags & M_SONAR)
|
||||
tf = techfact(item.ship.shp_tech, 1.0);
|
||||
tech = techfact(item.ship.shp_tech,
|
||||
mchr[(int)item.ship.shp_type].m_vrnge);
|
||||
mchr[(int)item.ship.shp_type].m_vrnge);
|
||||
} else {
|
||||
if (!(lchr[(int)item.land.lnd_type].l_flags & L_RADAR)) {
|
||||
pr("%s can't use radar!\n", prland(&item.land));
|
||||
|
|
|
@ -58,7 +58,7 @@ swaps(void)
|
|||
!getsect(sectb.sct_x, sectb.sct_y, §b))
|
||||
return RET_SYN;
|
||||
print_res(§b);
|
||||
if (!confirm ("Are you sure these are the two sectors you wish to swap? "))
|
||||
if (!confirm("Are you sure these are the two sectors you wish to swap? "))
|
||||
return RET_FAIL;
|
||||
if (!check_sect_ok(§a) || !check_sect_ok(§b))
|
||||
return RET_FAIL;
|
||||
|
|
|
@ -403,7 +403,7 @@ check_trade(void)
|
|||
"The bidding is over & you bought %s #%d from %s for $%.2f\n",
|
||||
trade_nameof(&trade, &tg), saveid, cname(trade.trd_owner),
|
||||
price);
|
||||
}
|
||||
}
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -255,4 +255,3 @@ tran_nmap(coord curx, coord cury, char *arg)
|
|||
{
|
||||
return display_region_map(0, EF_NUKE, curx, cury, arg);
|
||||
}
|
||||
|
||||
|
|
|
@ -40,8 +40,8 @@
|
|||
#include "ship.h"
|
||||
|
||||
enum {
|
||||
UPGR_COST = 15, /* how much avail and money to charge */
|
||||
UPGR_EFF = 35 /* efficiency reduction */
|
||||
UPGR_COST = 15, /* how much avail and money to charge */
|
||||
UPGR_EFF = 35 /* efficiency reduction */
|
||||
};
|
||||
|
||||
static int lupgr(void);
|
||||
|
|
|
@ -201,7 +201,7 @@ vers(void)
|
|||
pr("Fallout decays by %.0f%% per update\n",
|
||||
100.0 - (decay_per_etu + 6.0) * fallout_spread * MIN(24, etu_per_update) * 100.0);
|
||||
pr("\n");
|
||||
pr ("Damage to\t\t\tSpills to\n");
|
||||
pr("Damage to\t\t\tSpills to\n");
|
||||
pr("\t Sector People Mater. Ships Planes LandU.\n");
|
||||
pr("Sector\t\t --\t%3.0f%%\t100%%\t 0%%\t%3.0f%%\t%3.0f%%\n",
|
||||
people_damage * 100.0, unit_damage / 0.07, unit_damage * 100.0);
|
||||
|
|
|
@ -81,7 +81,7 @@ zdon(void)
|
|||
if (*p == 'y' || *p == 'Y') {
|
||||
checking = 0;
|
||||
wantupd = 1;
|
||||
} else if (*p == 'n' || *p == 'N') {
|
||||
} else if (*p == 'n' || *p == 'N') {
|
||||
checking = 0;
|
||||
wantupd = 0;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue