From 4836f6c543342eeff01a2641e1e6f4438cd14bac Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 16 Apr 2006 17:20:33 +0000 Subject: [PATCH] Fix long lines. No functional changes. --- src/client/login.c | 3 ++- src/client/termlib.c | 3 ++- src/lib/commands/anti.c | 3 ++- src/lib/commands/boar.c | 3 ++- src/lib/commands/bomb.c | 12 +++++----- src/lib/commands/buil.c | 20 +++++++++------- src/lib/commands/cede.c | 3 ++- src/lib/commands/desi.c | 3 ++- src/lib/commands/expl.c | 3 ++- src/lib/commands/fort.c | 3 ++- src/lib/commands/laun.c | 5 ++-- src/lib/commands/load.c | 6 +++-- src/lib/commands/mark.c | 6 ++--- src/lib/commands/mfir.c | 3 ++- src/lib/commands/mine.c | 7 +++++- src/lib/commands/miss.c | 16 +++++++++---- src/lib/commands/pdump.c | 3 ++- src/lib/commands/prod.c | 3 ++- src/lib/commands/reje.c | 4 +++- src/lib/commands/repo.c | 3 ++- src/lib/commands/set.c | 3 ++- src/lib/commands/surv.c | 3 ++- src/lib/commands/tend.c | 3 ++- src/lib/commands/upda.c | 3 ++- src/lib/commands/upgr.c | 15 +++++++----- src/lib/commands/vers.c | 52 ++++++++++++++++++++++++++-------------- src/lib/commands/work.c | 3 ++- src/lib/subs/mslsub.c | 6 ++--- src/server/main.c | 20 +++++++++++----- 29 files changed, 141 insertions(+), 79 deletions(-) diff --git a/src/client/login.c b/src/client/login.c index e88f6d57a..e6bc0090d 100644 --- a/src/client/login.c +++ b/src/client/login.c @@ -46,7 +46,8 @@ #endif int -login(int s, char *uname, char *cname, char *cpass, int kill_proc, int utf8) +login(int s, char *uname, char *cname, char *cpass, + int kill_proc, int utf8) { char tmp[128]; char buf[1024]; diff --git a/src/client/termlib.c b/src/client/termlib.c index 8e32b190b..08b177334 100644 --- a/src/client/termlib.c +++ b/src/client/termlib.c @@ -54,7 +54,8 @@ getsose(void) return; if (setupterm(NULL, fileno(stdout), &err) != OK) { - fprintf(stderr, "Can't setup terminal, check environment variable TERM\n"); + fprintf(stderr, + "Can't setup terminal, check environment variable TERM\n"); return; } diff --git a/src/lib/commands/anti.c b/src/lib/commands/anti.c index 5524a921a..7ed7c415e 100644 --- a/src/lib/commands/anti.c +++ b/src/lib/commands/anti.c @@ -86,7 +86,8 @@ anti(void) pr("No available mil or mob in sector.\n"); continue; } - pr("Sector mobility/troop strength will allow %d troops to engage.\n", avail_mil); + pr("Sector mobility/troop strength will allow %d troops to engage.\n", + avail_mil); if (target == player->cnum) { amil = mil; diff --git a/src/lib/commands/boar.c b/src/lib/commands/boar.c index 07314306e..c39a9dc17 100644 --- a/src/lib/commands/boar.c +++ b/src/lib/commands/boar.c @@ -109,7 +109,8 @@ boar(void) foundland = 1; } if (!foundland) { - pr("You don't have any mobility (sector or land units) in %s!\n", xyas(off->x, off->y, player->cnum)); + pr("You don't have any mobility (sector or land units) in %s!\n", + xyas(off->x, off->y, player->cnum)); return RET_SYN; } } diff --git a/src/lib/commands/bomb.c b/src/lib/commands/bomb.c index 46fcdc4d7..c836bad2f 100644 --- a/src/lib/commands/bomb.c +++ b/src/lib/commands/bomb.c @@ -574,8 +574,8 @@ ship_bomb(struct emp_qelem *list, struct sctstr *target) } else { pr("splash\n"); /* Bombs that miss have to land somewhere! */ - dam = pln_damage(&plp->plane, target->sct_x, target->sct_y, 'p', - &nukedam, 0); + dam = pln_damage(&plp->plane, target->sct_x, target->sct_y, + 'p', &nukedam, 0); collateral_damage(target->sct_x, target->sct_y, dam, list); dam = 0; } @@ -798,8 +798,8 @@ land_bomb(struct emp_qelem *list, struct sctstr *target) } else { pr("thud\n"); /* Bombs that miss have to land somewhere! */ - dam = pln_damage(&plp->plane, target->sct_x, target->sct_y, 'p', - &nukedam, 0); + dam = pln_damage(&plp->plane, target->sct_x, target->sct_y, + 'p', &nukedam, 0); collateral_damage(target->sct_x, target->sct_y, dam, list); dam = 0; } @@ -838,8 +838,8 @@ strat_bomb(struct emp_qelem *list, struct sctstr *target) if ((plp->pcp->pl_flags & P_C) && (!(plp->pcp->pl_flags & P_T))) continue; if (plp->bombs || plp->plane.pln_nuketype != -1) - dam += pln_damage(&plp->plane, target->sct_x, target->sct_y, 's', - &nukedam, 1); + dam += pln_damage(&plp->plane, target->sct_x, target->sct_y, + 's', &nukedam, 1); } if (dam <= 0) /* dam == 0 if only nukes were delivered */ return; diff --git a/src/lib/commands/buil.c b/src/lib/commands/buil.c index 1dcab3f82..2433a86f3 100644 --- a/src/lib/commands/buil.c +++ b/src/lib/commands/buil.c @@ -121,7 +121,8 @@ buil(void) } if (type < 0) { pr("You can't build that!\n"); - pr("Use `show plane build %d' to show types you can build.\n", tlev); + pr("Use `show plane build %d' to show types you can build.\n", + tlev); return RET_FAIL; } break; @@ -140,7 +141,8 @@ buil(void) } if (type < 0) { pr("You can't build that!\n"); - pr("Use `show ship build %d' to show types you can build.\n", tlev); + pr("Use `show ship build %d' to show types you can build.\n", + tlev); return RET_FAIL; } break; @@ -159,7 +161,8 @@ buil(void) } if (type < 0) { pr("You can't build that!\n"); - pr("Use `show land build %d' to show types you can build.\n", tlev); + pr("Use `show land build %d' to show types you can build.\n", + tlev); return RET_FAIL; } break; @@ -203,7 +206,8 @@ buil(void) tt = (tlev < (rlev / drnuke_const) ? (int)tlev : (int)(rlev / drnuke_const)); pr("You can't build that!\n"); - pr("Use `show nuke build %d' to show types you can build.\n", tt); + pr("Use `show nuke build %d' to show types you can build.\n", + tt); return RET_FAIL; } break; @@ -572,8 +576,8 @@ build_bridge(struct sctstr *sp, short *vec) xyas(sp->sct_x, sp->sct_y, player->cnum)); nav_map(sp->sct_x, sp->sct_y, 1); } - if (!(p = getstarg(player->argp[3], "build span in what direction? ", buf)) - || !*p) { + p = getstarg(player->argp[3], "build span in what direction? ", buf); + if (!p || !*p) { return 0; } /* Sanity check time */ @@ -836,8 +840,8 @@ build_tower(struct sctstr *sp, short *vec) pr("Building from %s\n", xyas(sp->sct_x, sp->sct_y, player->cnum)); nav_map(sp->sct_x, sp->sct_y, 1); } - if (!(p = getstarg(player->argp[3], "build tower in what direction? ", buf)) - || !*p) { + p = getstarg(player->argp[3], "build tower in what direction? ", buf); + if (!p || !*p) { return 0; } /* Sanity check time */ diff --git a/src/lib/commands/cede.c b/src/lib/commands/cede.c index 38e2f3b15..fd218db59 100644 --- a/src/lib/commands/cede.c +++ b/src/lib/commands/cede.c @@ -162,7 +162,8 @@ cede_sect(struct nstr_sect *ns, natid to) bad = 0; } if (bad) { - pr("%s has no sector with mobility adjacent to or ship in %s!\n", cname(to), xyas(sect.sct_x, sect.sct_y, player->cnum)); + pr("%s has no sector with mobility adjacent to or ship in %s!\n", + cname(to), xyas(sect.sct_x, sect.sct_y, player->cnum)); continue; } diff --git a/src/lib/commands/desi.c b/src/lib/commands/desi.c index f9df83b13..2f25e54ee 100644 --- a/src/lib/commands/desi.c +++ b/src/lib/commands/desi.c @@ -126,7 +126,8 @@ do_desi(struct natstr *natp, s_char *sects, s_char *deschar, long int cash, } if (dchr[des].d_cost < 0) { if (for_real) - pr("Only %s can make a %s!\n", cname(0), dchr[des].d_name); + pr("Only %s can make a %s!\n", + cname(0), dchr[des].d_name); continue; } } diff --git a/src/lib/commands/expl.c b/src/lib/commands/expl.c index 7cb3e21d2..d85b586d7 100644 --- a/src/lib/commands/expl.c +++ b/src/lib/commands/expl.c @@ -161,7 +161,8 @@ explore(void) amount - left, ip->i_name, left, ip->i_name, xyas(endsect.sct_x, endsect.sct_y, player->cnum)); } else { - pr("All of the %s you were exploring with were destroyed!\n", ip->i_name); + pr("All of the %s you were exploring with were destroyed!\n", + ip->i_name); } amount = left; } diff --git a/src/lib/commands/fort.c b/src/lib/commands/fort.c index 519fcf041..732f15bc4 100644 --- a/src/lib/commands/fort.c +++ b/src/lib/commands/fort.c @@ -71,7 +71,8 @@ fort(void) continue; } if (land.lnd_land >= 0) { - pr("%s is on a land unit and can't be fortified\n", prland(&land)); + pr("%s is on a land unit and can't be fortified\n", + prland(&land)); continue; } diff --git a/src/lib/commands/laun.c b/src/lib/commands/laun.c index 00bd7cf15..506745522 100644 --- a/src/lib/commands/laun.c +++ b/src/lib/commands/laun.c @@ -429,8 +429,9 @@ launch_sat(struct plnstr *pp, int sublaunch) pp->pln_x = sx; pp->pln_y = sy; pp->pln_flags |= PLN_LAUNCHED; - pp->pln_mobil = (pp->pln_mobil > dist) ? (pp->pln_mobil - dist) : 0; + pp->pln_mobil = pp->pln_mobil > dist ? pp->pln_mobil - dist : 0; putplane(pp->pln_uid, pp); - pr(", will be ready for use in %d time units\n", plane_mob_max - pp->pln_mobil); + pr(", will be ready for use in %d time units\n", + plane_mob_max - pp->pln_mobil); return RET_OK; } diff --git a/src/lib/commands/load.c b/src/lib/commands/load.c index 0bd4d7226..758f4ae28 100644 --- a/src/lib/commands/load.c +++ b/src/lib/commands/load.c @@ -621,7 +621,8 @@ load_land_ship(struct sctstr *sectp, struct shpstr *sp, int noisy, (sp->shp_nland >= mchr[(int)sp->shp_type].m_nland)) { if (noisy) { if (mchr[(int)sp->shp_type].m_nland) - pr("%s doesn't have room for any more land units!\n", prship(sp)); + pr("%s doesn't have room for any more land units!\n", + prship(sp)); else pr("%s cannot carry land units!\n", prship(sp)); } @@ -1079,7 +1080,8 @@ load_land_land(struct sctstr *sectp, struct lndstr *lp, int noisy, if (lp->lnd_nland >= lp->lnd_maxland) { if (noisy) { if (lp->lnd_nland) - pr("%s doesn't have room for any more land units!\n", prland(lp)); + pr("%s doesn't have room for any more land units!\n", + prland(lp)); else pr("%s cannot carry land units!\n", prland(lp)); } diff --git a/src/lib/commands/mark.c b/src/lib/commands/mark.c index e98b7800b..bcb2ccaf5 100644 --- a/src/lib/commands/mark.c +++ b/src/lib/commands/mark.c @@ -82,10 +82,8 @@ pr_mark(struct comstr *comm) if (tleft < 0.0) tleft = 0.0; pr(" %3d $%12.2f %2d %5.2f hrs (%3d) %c %6d ", - comm->com_uid, - comm->com_price, - comm->com_maxbidder, - tleft, comm->com_owner, ichr[comm->com_type].i_mnem, comm->com_amount); + comm->com_uid, comm->com_price, comm->com_maxbidder, tleft, + comm->com_owner, ichr[comm->com_type].i_mnem, comm->com_amount); if (comm->com_owner == player->cnum || player->god) pr("%s", xyas(comm->sell_x, comm->sell_y, player->cnum)); pr("\n"); diff --git a/src/lib/commands/mfir.c b/src/lib/commands/mfir.c index b11abfac0..8d83fc0f8 100644 --- a/src/lib/commands/mfir.c +++ b/src/lib/commands/mfir.c @@ -188,7 +188,8 @@ multifire(void) continue; } if (fland.lnd_effic < LAND_MINFIREEFF) { - pr("Unit %d cannot fire because it is less than %d%% efficient\n", fland.lnd_uid, LAND_MINFIREEFF); + pr("Unit %d cannot fire because it is less than %d%% efficient\n", + fland.lnd_uid, LAND_MINFIREEFF); continue; } resupply_commod(&fland, I_SHELL); /* Get more shells */ diff --git a/src/lib/commands/mine.c b/src/lib/commands/mine.c index dd0baf1f3..1f1302219 100644 --- a/src/lib/commands/mine.c +++ b/src/lib/commands/mine.c @@ -163,7 +163,12 @@ landmine(void) else pr("\n"); } else - pr("%s ran out of %s before it could finish the job\nOnly %d mines were laid in %s\n", prland(&land), land.lnd_mobil > 0 ? "supply" : "mobility", total_mines_laid, xyas(sect.sct_x, sect.sct_y, land.lnd_own)); + pr("%s ran out of %s before it could finish the job\n" + "Only %d mines were laid in %s\n", + prland(&land), + land.lnd_mobil > 0 ? "supply" : "mobility", + total_mines_laid, + xyas(sect.sct_x, sect.sct_y, land.lnd_own)); } return RET_OK; } diff --git a/src/lib/commands/miss.c b/src/lib/commands/miss.c index ceadc3341..d0d3263c6 100644 --- a/src/lib/commands/miss.c +++ b/src/lib/commands/miss.c @@ -275,7 +275,9 @@ mission(void) pcp = &plchr[(int)gp->type]; if (!(pcp->pl_flags & P_T)) { - pr("Only planes with the tactical ability can interdict.\n%s #%d is ineligible\n", pcp->pl_name, gp->uid); + pr("Only planes with the tactical ability can interdict.\n" + "%s #%d is ineligible\n", + pcp->pl_name, gp->uid); continue; } } @@ -285,7 +287,9 @@ mission(void) pcp = &plchr[(int)gp->type]; if (!(pcp->pl_flags & P_F)) { - pr("Only planes with the intercept abilities can perform air defense.\n%s #%d is ineligible\n", pcp->pl_name, gp->uid); + pr("Only planes with the intercept abilities can perform air defense.\n" + "%s #%d is ineligible\n", + pcp->pl_name, gp->uid); continue; } } @@ -295,7 +299,9 @@ mission(void) pcp = &plchr[(int)gp->type]; if (!(pcp->pl_flags & P_ESC) && !(pcp->pl_flags & P_F)) { - pr("Only planes with the escort or intercept abilities can escort.\n%s #%d is ineligible\n", pcp->pl_name, gp->uid); + pr("Only planes with the escort or intercept abilities can escort.\n" + "%s #%d is ineligible\n", + pcp->pl_name, gp->uid); continue; } } @@ -306,7 +312,9 @@ mission(void) pcp = &plchr[(int)gp->type]; if (!(pcp->pl_flags & P_T)) { - pr("Only planes with the tactical ability can support.\n%s #%d is ineligible\n", pcp->pl_name, gp->uid); + pr("Only planes with the tactical ability can support.\n" + "%s #%d is ineligible\n", + pcp->pl_name, gp->uid); continue; } } diff --git a/src/lib/commands/pdump.c b/src/lib/commands/pdump.c index 1383e3796..626e3a214 100644 --- a/src/lib/commands/pdump.c +++ b/src/lib/commands/pdump.c @@ -277,7 +277,8 @@ pdump(void) case 19: if ((plchr[(int)plane.pln_type].pl_flags & (P_O | P_M)) == P_O) { - pr(" %c", (plane.pln_flags & PLN_SYNCHRONOUS) ? 'Y' : 'N'); + pr(" %c", + (plane.pln_flags & PLN_SYNCHRONOUS) ? 'Y' : 'N'); } else pr(" N"); break; diff --git a/src/lib/commands/prod.c b/src/lib/commands/prod.c index 13af38576..3469ebd8f 100644 --- a/src/lib/commands/prod.c +++ b/src/lib/commands/prod.c @@ -120,7 +120,8 @@ prod(void) /* during the update, but it's the best we can really do */ work = new_work(§, total_work(sect.sct_work, etu_per_update, - civs, sect.sct_item[I_MILIT], uws, maxpop)); + civs, sect.sct_item[I_MILIT], uws, + maxpop)); bwork = work / 2; if (sect.sct_off) diff --git a/src/lib/commands/reje.c b/src/lib/commands/reje.c index 56b95a8d9..9fda3b712 100644 --- a/src/lib/commands/reje.c +++ b/src/lib/commands/reje.c @@ -90,7 +90,9 @@ reje(void) return RET_SYN; while (nxtitem(&ni, &nat)) { if (nat.nat_stat == STAT_GOD) { - pr("You may not reject/accept stuff from %s\nbecause they are a deity.\n", nat.nat_cnam); + pr("You may not reject/accept stuff from %s\n" + "because they are a deity.\n", + nat.nat_cnam); continue; } if (nat.nat_stat == STAT_UNUSED) diff --git a/src/lib/commands/repo.c b/src/lib/commands/repo.c index 13864f74b..f4533923c 100644 --- a/src/lib/commands/repo.c +++ b/src/lib/commands/repo.c @@ -117,7 +117,8 @@ printdiff(struct natstr *plnatp, struct natstr *natp, int what) int tolerance; if (ours - && plnatp->nat_stat >= STAT_ACTIVE && natp->nat_stat >= STAT_ACTIVE) { + && plnatp->nat_stat >= STAT_ACTIVE + && natp->nat_stat >= STAT_ACTIVE) { theirs = natp->nat_level[what]; if ((shift = MIN((int)theirs, (int)ours) - 100) > 0) { ours -= shift; diff --git a/src/lib/commands/set.c b/src/lib/commands/set.c index ddf15506b..9c316d228 100644 --- a/src/lib/commands/set.c +++ b/src/lib/commands/set.c @@ -78,7 +78,8 @@ set(void) check_market(); check_trade(); - if ((p = getstarg(player->argp[1], "Ship, plane, land unit or nuke? ", buf)) == 0) + p = getstarg(player->argp[1], "Ship, plane, land unit or nuke? ", buf); + if (p == 0) return RET_SYN; if ((type = ef_byname_from(p, ef_saleable)) < 0) { pr("You can sell only ships, planes, land units or nukes\n"); diff --git a/src/lib/commands/surv.c b/src/lib/commands/surv.c index c4d7d618a..75098cfe3 100644 --- a/src/lib/commands/surv.c +++ b/src/lib/commands/surv.c @@ -72,7 +72,8 @@ surv(void) static s_char **map = NULL; nsect = 0; - if ((ptr = getstarg(player->argp[1], "commodity or variable? ", buf)) == 0) + ptr = getstarg(player->argp[1], "commodity or variable? ", buf); + if (ptr == 0) return RET_SYN; ptr = nstr_comp_val(ptr, &val, EF_SECTOR); if (!ptr) diff --git a/src/lib/commands/tend.c b/src/lib/commands/tend.c index fe83fae04..54b1ff1ed 100644 --- a/src/lib/commands/tend.c +++ b/src/lib/commands/tend.c @@ -226,7 +226,8 @@ tend_land(struct shpstr *tenderp, s_char *units) continue; } if (!(lchr[(int)land.lnd_type].l_flags & L_ASSAULT)) { - pr("%s does not have \"assault\" capability and can't be tended\n", prland(&land)); + pr("%s does not have \"assault\" capability and can't be tended\n", + prland(&land)); continue; } if (!snxtitem(&targets, EF_SHIP, diff --git a/src/lib/commands/upda.c b/src/lib/commands/upda.c index da9355a6b..e18472e65 100644 --- a/src/lib/commands/upda.c +++ b/src/lib/commands/upda.c @@ -135,7 +135,8 @@ upda(void) if (*update_demandtimes != 0) pr("Demand updates are allowed during: %s\n", update_demandtimes); - pr("Demand updates require %d country(s) to want one.\n", update_wantmin); + pr("Demand updates require %d country(s) to want one.\n", + update_wantmin); } } if (*game_days != 0) diff --git a/src/lib/commands/upgr.c b/src/lib/commands/upgr.c index 0be9cfc1a..2c9bc427a 100644 --- a/src/lib/commands/upgr.c +++ b/src/lib/commands/upgr.c @@ -109,8 +109,9 @@ lupgr(void) if (sect.sct_type != SCT_HEADQ || sect.sct_effic < 60) continue; rel = getrel(getnatp(land.lnd_own), sect.sct_own); - if ((rel < FRIENDLY) && (sect.sct_own != land.lnd_own)) { - pr("You are not on friendly terms with the owner of unit %d!\n", land.lnd_uid); + if (rel < FRIENDLY && sect.sct_own != land.lnd_own) { + pr("You are not on friendly terms with the owner of unit %d!\n", + land.lnd_uid); continue; } n++; @@ -192,8 +193,9 @@ supgr(void) if (sect.sct_type != SCT_HARBR || sect.sct_effic < 60) continue; rel = getrel(getnatp(ship.shp_own), sect.sct_own); - if ((rel < FRIENDLY) && (sect.sct_own != ship.shp_own)) { - pr("You are not on friendly terms with the owner of ship %d!\n", ship.shp_uid); + if (rel < FRIENDLY && sect.sct_own != ship.shp_own) { + pr("You are not on friendly terms with the owner of ship %d!\n", + ship.shp_uid); continue; } n++; @@ -274,8 +276,9 @@ pupgr(void) if (sect.sct_type != SCT_AIRPT || sect.sct_effic < 60) continue; rel = getrel(getnatp(plane.pln_own), sect.sct_own); - if ((rel < FRIENDLY) && (sect.sct_own != plane.pln_own)) { - pr("You are not on friendly terms with the owner of plane %d!\n", plane.pln_uid); + if (rel < FRIENDLY && sect.sct_own != plane.pln_own) { + pr("You are not on friendly terms with the owner of plane %d!\n", + plane.pln_uid); continue; } n++; diff --git a/src/lib/commands/vers.c b/src/lib/commands/vers.c index 1be749c45..a6d20d629 100644 --- a/src/lib/commands/vers.c +++ b/src/lib/commands/vers.c @@ -95,11 +95,13 @@ vers(void) pr("Banks pay $%.2f in interest per 1000 gold bars per etu.\n", bankint * 1000.0); - pr("1000 civilians generate $%.2f, uncompensated workers $%.2f each time unit.\n", 1000.0 * money_civ, 1000.0 * money_uw); + pr("1000 civilians generate $%.2f, uncompensated workers $%.2f each time unit.\n", + 1000.0 * money_civ, 1000.0 * money_uw); pr("1000 active military cost $%.2f, reserves cost $%.2f.\n", -money_mil * 1000.0, -money_res * 1000.0); if (rollover_avail_max) - pr("Up to %d avail can roll over an update.\n", rollover_avail_max); + pr("Up to %d avail can roll over an update.\n", + rollover_avail_max); if (opt_SLOW_WAR) pr("Declaring war will cost you $%i\n\n", War_Cost); pr("Happiness p.e. requires 1 happy stroller per %d civ.\n", @@ -109,9 +111,11 @@ vers(void) pr("Happiness is averaged over %d time units.\n", (int)hap_avg); pr("Education is averaged over %d time units.\n", (int)edu_avg); if (opt_ALL_BLEED == 0) - pr("The technology/research boost you get from your allies is %.2f%%.\n", 100.0 / ally_factor); + pr("The technology/research boost you get from your allies is %.2f%%.\n", + 100.0 / ally_factor); else - pr("The technology/research boost you get from the world is %.2f%%.\n", 100.0 / ally_factor); + pr("The technology/research boost you get from the world is %.2f%%.\n", + 100.0 / ally_factor); pr("Nation levels (tech etc.) decline 1%% every %d time units.\n", (int)(level_age_rate)); @@ -160,27 +164,39 @@ vers(void) -(etu_per_update / sect_mob_neg_factor)); pr("\n"); if (opt_FUEL) - pr("For ships and land units, fuelu makes %d mobility.\n\n", fuel_mult); + pr("For ships and land units, fuelu makes %d mobility.\n\n", + fuel_mult); pr("Ships on autonavigation may use %i cargo holds per ship.\n", TMAX); if (opt_TRADESHIPS) { - pr("Trade-ships that go at least %d sectors get a return of %.1f%% per sector.\n", trade_1_dist, (float)(trade_1 * 100.0)); - pr("Trade-ships that go at least %d sectors get a return of %.1f%% per sector.\n", trade_2_dist, (float)(trade_2 * 100.0)); - pr("Trade-ships that go at least %d sectors get a return of %.1f%% per sector.\n", trade_3_dist, (float)(trade_3 * 100.0)); - pr("Cashing in trade-ships with an ally nets you a %.1f%% bonus.\n", trade_ally_bonus * 100.0); - pr("Cashing in trade-ships with an ally nets your ally a %.1f%% bonus.\n\n", trade_ally_cut * 100.0); + pr("Trade-ships that go at least %d sectors get a return of %.1f%% per sector.\n", + trade_1_dist, (float)(trade_1 * 100.0)); + pr("Trade-ships that go at least %d sectors get a return of %.1f%% per sector.\n", + trade_2_dist, (float)(trade_2 * 100.0)); + pr("Trade-ships that go at least %d sectors get a return of %.1f%% per sector.\n", + trade_3_dist, (float)(trade_3 * 100.0)); + pr("Cashing in trade-ships with an ally nets you a %.1f%% bonus.\n", + trade_ally_bonus * 100.0); + pr("Cashing in trade-ships with an ally nets your ally a %.1f%% bonus.\n\n", + trade_ally_cut * 100.0); } if (opt_MARKET) { - pr("The tax you pay on selling things on the trading block is %.1f%%\n", (1.00 - tradetax) * 100.0); - pr("The tax you pay on buying commodities on the market is %.1f%%\n", (buytax - 1.00) * 100.0); - pr("The amount of time to bid on commodities is %d seconds.\n", MARK_DELAY); - pr("The amount of time to bid on a unit is %d seconds.\n\n", TRADE_DELAY); + pr("The tax you pay on selling things on the trading block is %.1f%%\n", + (1.00 - tradetax) * 100.0); + pr("The tax you pay on buying commodities on the market is %.1f%%\n", + (buytax - 1.00) * 100.0); + pr("The amount of time to bid on commodities is %d seconds.\n", + MARK_DELAY); + pr("The amount of time to bid on a unit is %d seconds.\n\n", + TRADE_DELAY); } if (!ef_nelem(EF_NUKE_CHR)) pr("Nukes are disabled.\n"); else if (drnuke_const > MIN_DRNUKE_CONST) { - pr("In order to build a nuke, you need %1.2f times the tech level in research\n", drnuke_const); - pr("\tExample: In order to build a 300 tech nuke, you need %d research\n\n", (int)(300.0 * drnuke_const)); + pr("In order to build a nuke, you need %1.2f times the tech level in research\n", + drnuke_const); + pr("\tExample: In order to build a 300 tech nuke, you need %d research\n\n", + (int)(300.0 * drnuke_const)); } pr("Fire ranges are scaled by %.2f.\n", fire_range_factor); @@ -218,9 +234,9 @@ vers(void) show_opts(0); pr("\n\nSee \"info Options\" for a detailed list of options and descriptions.\n"); show_custom(); - pr("\nThe person to annoy if something goes wrong is:\n\t%s\n\t(%s).\n\n", + pr("\nThe person to annoy if something goes wrong is:\n\t%s\n\t(%s).\n", privname, privlog); - pr("You can get your own copy of the source from " + pr("\nYou can get your own copy of the source from " "http://www.wolfpackempire.com/\n\n"); pr("%s", legal); return RET_OK; diff --git a/src/lib/commands/work.c b/src/lib/commands/work.c index 998489d8c..d06f320fc 100644 --- a/src/lib/commands/work.c +++ b/src/lib/commands/work.c @@ -92,7 +92,8 @@ work(void) eff_amt = MIN(land.lnd_mobil, work_amt); w = ldround(((double)eff_amt * land.lnd_effic / 600.0), 1); if (w < 1) { - pr("%s doesn't work enough to change efficiency (try increasing amount)\n", prland(&land)); + pr("%s doesn't work enough to change efficiency (try increasing amount)\n", + prland(&land)); continue; } nunits++; diff --git a/src/lib/subs/mslsub.c b/src/lib/subs/mslsub.c index bfa4c75db..dfe8a48e3 100644 --- a/src/lib/subs/mslsub.c +++ b/src/lib/subs/mslsub.c @@ -237,10 +237,8 @@ msl_intercept(coord x, coord y, natid bombown, int hardtarget, news_item = N_SAT_KILL; if (sect.sct_own) { mpr(sect.sct_own, "%s has positioned a satellite over %s\n", - sublaunch ? (s_char *)"someone" : cname(bombown), xyas(x, - y, - sect. - sct_own)); + sublaunch ? "someone" : cname(bombown), + xyas(x, y, sect.sct_own)); } } else if (wantflags == P_N && nowantflags == P_O) { att_name = "warhead"; diff --git a/src/server/main.c b/src/server/main.c index 5da867768..fdc480320 100644 --- a/src/server/main.c +++ b/src/server/main.c @@ -206,23 +206,27 @@ main(int argc, char **argv) exit(EXIT_FAILURE); ef_init(); if (chdir(configdir)) { - fprintf(stderr, "Can't chdir to %s (%s)\n", configdir, strerror(errno)); + fprintf(stderr, "Can't chdir to %s (%s)\n", + configdir, strerror(errno)); exit(EXIT_FAILURE); } if (chdir(builtindir)) { - fprintf(stderr, "Can't chdir to %s (%s)\n", builtindir, strerror(errno)); + fprintf(stderr, "Can't chdir to %s (%s)\n", + builtindir, strerror(errno)); exit(EXIT_FAILURE); } if (read_builtin_tables() < 0) exit(EXIT_FAILURE); if (chdir(configdir)) { - fprintf(stderr, "Can't chdir to %s (%s)\n", configdir, strerror(errno)); + fprintf(stderr, "Can't chdir to %s (%s)\n", + configdir, strerror(errno)); exit(EXIT_FAILURE); } if (read_custom_tables() < 0) exit(EXIT_FAILURE); if (chdir(gamedir)) { - fprintf(stderr, "Can't chdir to %s (%s)\n", gamedir, strerror(errno)); + fprintf(stderr, "Can't chdir to %s (%s)\n", + gamedir, strerror(errno)); exit(EXIT_FAILURE); } @@ -235,7 +239,10 @@ main(int argc, char **argv) #if defined(_WIN32) if (daemonize != 0) { - SERVICE_TABLE_ENTRY DispatchTable[]={{"Empire Server", service_main},{NULL, NULL}}; + SERVICE_TABLE_ENTRY DispatchTable[]={ + {"Empire Server", service_main}, + {NULL, NULL} + }; if (StartServiceCtrlDispatcher(DispatchTable)) return 0; else { @@ -244,7 +251,8 @@ main(int argc, char **argv) * start server in the foreground */ if (GetLastError() != ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) { - logerror("Failed to dispatch service (%lu)", GetLastError()); + logerror("Failed to dispatch service (%lu)", + GetLastError()); finish_server(); exit(EXIT_FAILURE); } -- 2.43.0