]> git.pond.sub.org Git - empserver/commitdiff
Fix long lines. No functional changes.
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 16 Apr 2006 17:20:33 +0000 (17:20 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 16 Apr 2006 17:20:33 +0000 (17:20 +0000)
29 files changed:
src/client/login.c
src/client/termlib.c
src/lib/commands/anti.c
src/lib/commands/boar.c
src/lib/commands/bomb.c
src/lib/commands/buil.c
src/lib/commands/cede.c
src/lib/commands/desi.c
src/lib/commands/expl.c
src/lib/commands/fort.c
src/lib/commands/laun.c
src/lib/commands/load.c
src/lib/commands/mark.c
src/lib/commands/mfir.c
src/lib/commands/mine.c
src/lib/commands/miss.c
src/lib/commands/pdump.c
src/lib/commands/prod.c
src/lib/commands/reje.c
src/lib/commands/repo.c
src/lib/commands/set.c
src/lib/commands/surv.c
src/lib/commands/tend.c
src/lib/commands/upda.c
src/lib/commands/upgr.c
src/lib/commands/vers.c
src/lib/commands/work.c
src/lib/subs/mslsub.c
src/server/main.c

index e88f6d57a86d057bfdc5242c95fc45a99f6505da..e6bc0090d9af340971909fc6e12ccc586ffbb5b3 100644 (file)
@@ -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];
index 8e32b190bc02b593b9cacdf3b568e9404c0e610b..08b1773342b9c2f4ad8c71a5ed0c23b3305ea1a8 100644 (file)
@@ -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;
     }
 
index 5524a921ab17b4834d2c21f25b2ad61be7b7c986..7ed7c415ecbf39f53483f4a129867f491870de02 100644 (file)
@@ -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;
index 07314306e545555d5a0fd4a365323a3efa9aacc0..c39a9dc174072b7d133cd7a6a498361863ce32ba 100644 (file)
@@ -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;
            }
        }
index 46fcdc4d7a6cf057696d5abf3ec0579089ee801f..c836bad2fe56ef4d493ed72a696b5e96779e9669 100644 (file)
@@ -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;
index 1dcab3f82ef0079895e3d82a8dafd7e5649804d8..2433a86f33b13246a72b0f99cf3d9774933b7660 100644 (file)
@@ -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 */
index 38e2f3b1570ba4eaa0ce78acf610162dc3997a09..fd218db598f1cdabcfdadd87b82f3fd2d9eef21c 100644 (file)
@@ -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;
        }
 
index f9df83b13fc2441571d7e640e49b6e70b4772383..2f25e54ee2fa79768c63e7bf8f89caa708ebe7ed 100644 (file)
@@ -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;
            }
        }
index 7cb3e21d296f7966beac85ae76a788f1068d4356..d85b586d7ede07b27e5792019acf19b6cb7bbb61 100644 (file)
@@ -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;
        }
index 519fcf04124b01de876a210275f118313e7ee652..732f15bc404ca02d2a8b16d2f38ee757b14b3c74 100644 (file)
@@ -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;
        }
 
index 00bd7cf15ba7c3926642b35cc26875f41eedf5be..50674552255b6a57233681a497d3a2083294c540 100644 (file)
@@ -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;
 }
index 0bd4d7226b23d82017bc849edd2c64d5d8c574fe..758f4ae28fabaa7717bf4e022331b46d0884c07e 100644 (file)
@@ -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));
                }
index e98b7800b3a1997c6ea9ee8aed7c29919ee3b394..bcb2ccaf5d0d2e2cd90565837663a0ad22cd9851 100644 (file)
@@ -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");
index b11abfac0421eaf7ee751735da4bdb3b6a1fa638..8d83fc0f8c7ae5e2fd425ae12e8e15d4a09dbdce 100644 (file)
@@ -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 */
index dd0baf1f30607368330c0ba6d737a3ff79b0963c..1f1302219f6c4c3a1c43e67d240ca456eacddbd9 100644 (file)
@@ -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;
 }
index ceadc3341cdb7f5dc81cd0d0984d37d4a94e0ac3..d0d3263c665755f313cc45e77815c7f5fcfbf753 100644 (file)
@@ -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;
            }
        }
index 1383e379654a8a0d09175a3b50076e88e5626e4f..626e3a214fe650ac45cd3674505647faac840ee1 100644 (file)
@@ -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;
index 13af38576a104f619b673a4c555668508c227a4b..3469ebd8f51f9c440d96c545460eccbad7b0fd04 100644 (file)
@@ -120,7 +120,8 @@ prod(void)
        /* during the update, but it's the best we can really do  */
        work = new_work(&sect,
                        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)
index 56b95a8d961d51f6b76d0c7699043411d1d85010..9fda3b7124da4758cd818d4a4d26a07324178c10 100644 (file)
@@ -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)
index 13864f74bac38ebf30e051ab02db742be1bb8a53..f4533923c87b70ca80d0f132c3bd348f1fff45f0 100644 (file)
@@ -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;
index ddf15506bc8ec61d021c25a2bb72a359515c510c..9c316d228914bea255b4b40d12a85fe819ccd36f 100644 (file)
@@ -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");
index c4d7d618ac5f2002a0fa9c2643479e6011159638..75098cfe3140f95abcbdc0810820238b337d8543 100644 (file)
@@ -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)
index fe83fae04463a38ff5a6600cc2ad59b77978bbda..54b1ff1edd3f9b8e04281fa9910375b9ec9f8529 100644 (file)
@@ -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,
index da9355a6b5de8b719f0c69eb627c71438f01229f..e18472e65f91616149f9b09a69e16a5621b9ba5f 100644 (file)
@@ -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)
index 0be9cfc1a038f4291e6a6c1a24069f7e1023521a..2c9bc427a6602fb003448af83073cd5ff48f4f41 100644 (file)
@@ -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++;
index 1be749c45564c234606b807029916b9664d087af..a6d20d629b2430e2b7b4114793bb45ad6bf04de7 100644 (file)
@@ -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;
index 998489d8c81056a3d8d89021fda2a968dbc4b887..d06f320fc571a02deef031cb5a9f435ce736f895 100644 (file)
@@ -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++;
index bfa4c75db0256db442464741caa55d4d2a5f4c09..dfe8a48e383a9d672900d09cb0dd278cac716799 100644 (file)
@@ -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";
index 5da867768ac365a1d0e7e72c0f6b4ab9dbc0cc57..fdc4803207797ec873341e395e5433a996d57511 100644 (file)
@@ -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);
            }