diff --git a/include/misc.h b/include/misc.h index 61c2518b..ad118395 100644 --- a/include/misc.h +++ b/include/misc.h @@ -78,9 +78,11 @@ struct mob_acc_globals { #define ATTRIBUTE(attrs) #endif -/* This uses a lot of thread stack with some versions of GNU libc, - which can lead to nasty heap smashes (observed with 2.2.93). - Disabled for now, until we readjust thread stack sizes. */ +/* + * This uses a lot of thread stack with some versions of GNU libc, + * which can lead to nasty heap smashes (observed with 2.2.93). + * Disabled for now, until we readjust thread stack sizes. + */ #if 0 #define RESOLVE_IPADDRESS /* resolve ip addresses into hostnames */ #endif diff --git a/include/prototypes.h b/include/prototypes.h index 8701cae7..ea762638 100644 --- a/include/prototypes.h +++ b/include/prototypes.h @@ -602,11 +602,7 @@ extern int ufindpfx(char *, int); /* radmap.c */ extern int deltx(struct range *, coord); - /* Prototype include a typedef name. - It should be moved after the typedef declaration */ extern int delty(struct range *, coord); - /* Prototype include a typedef name. - It should be moved after the typedef declaration */ extern void radmap(int, int, int, int, double); extern void radmapnopr(int, int, int, int, double); extern void radmapupd(int, int, int, int, int, double); diff --git a/src/client/ioqueue.h b/src/client/ioqueue.h index 860d479c..c8565b0b 100644 --- a/src/client/ioqueue.h +++ b/src/client/ioqueue.h @@ -45,7 +45,7 @@ struct io { struct qelem queue; /* list of ioqueue elements */ int nbytes; /* number of data bytes present */ int offset; /* offset into current entry */ - char *data; /* pointer to start */ + char *data; /* pointer to start */ }; void ioq_init(struct ioqueue *ioq, int bsize); diff --git a/src/client/servcmd.c b/src/client/servcmd.c index ce14976e..fbf3fb9a 100644 --- a/src/client/servcmd.c +++ b/src/client/servcmd.c @@ -282,11 +282,12 @@ doexecute(char *p, FILE *auxfi) /* copies 4k at a time to the socket */ while (termio(fd, sock, auxfi)) /*do copy */ ; - /* Some platforms don't send the eof (cntl-D) at the end of - copying a file. If emp_client hangs at the end of an - execute, include the following line and notify wolfpack - of the platform you are using. - sendeof(sock); + /* + * Some platforms don't send the eof (cntl-D) at the end of + * copying a file. If emp_client hangs at the end of an + * execute, include the following line and notify wolfpack + * of the platform you are using. + * sendeof(sock); */ close(fd); free(tag); diff --git a/src/lib/as/as_delete.c b/src/lib/as/as_delete.c index f536bdff..4041c7fd 100644 --- a/src/lib/as/as_delete.c +++ b/src/lib/as/as_delete.c @@ -32,7 +32,6 @@ static void as_free_queue(struct as_queue *queue); void as_reset(struct as_data *adp) { - as_free_queue(adp->head); adp->head = NULL; as_free_queue(adp->tried); diff --git a/src/lib/commands/cede.c b/src/lib/commands/cede.c index 670e5af3..87f88458 100644 --- a/src/lib/commands/cede.c +++ b/src/lib/commands/cede.c @@ -250,8 +250,8 @@ grab_sect(struct sctstr *sp, natid to) if (lp->lnd_own != player->cnum) continue; - wu(0, to, "\t%s ceded to you by %s\n", prland(lp), - cname(player->cnum)); + wu(0, to, "\t%s ceded to you by %s\n", + prland(lp), cname(player->cnum)); makelost(EF_LAND, lp->lnd_own, lp->lnd_uid, lp->lnd_x, lp->lnd_y); makenotlost(EF_LAND, to, lp->lnd_uid, lp->lnd_x, lp->lnd_y); lp->lnd_own = to; diff --git a/src/lib/commands/conv.c b/src/lib/commands/conv.c index 160daa92..4c340422 100644 --- a/src/lib/commands/conv.c +++ b/src/lib/commands/conv.c @@ -96,7 +96,7 @@ do_conv(struct nstr_sect nstr, int uwtoconvert, int for_real) /* * Military units count according to the number of - * mil in them. (i.e. attack/defense modified don't + * mil in them. (i.e. attack/defense modifier don't * count. */ snxtitem_xy(&ni, EF_LAND, sect.sct_x, sect.sct_y); diff --git a/src/lib/commands/foll.c b/src/lib/commands/foll.c index df60a181..307cd0fa 100644 --- a/src/lib/commands/foll.c +++ b/src/lib/commands/foll.c @@ -78,8 +78,8 @@ foll(void) if (!player->owner) continue; if (ship.shp_x != x || ship.shp_y != y) { - pr("Ship #%d not in same sector as #%d\n", ship.shp_uid, - leader); + pr("Ship #%d not in same sector as #%d\n", + ship.shp_uid, leader); continue; } if (ship.shp_uid == leader) { diff --git a/src/lib/commands/look.c b/src/lib/commands/look.c index c0329de6..e482dcc6 100644 --- a/src/lib/commands/look.c +++ b/src/lib/commands/look.c @@ -97,10 +97,12 @@ look(void) civ = sect.sct_item[I_CIVIL]; mil = sect.sct_item[I_MILIT]; if (civ) - pr("with %s%d civ ", player->owner ? "" : "approx ", + pr("with %s%d civ ", + player->owner ? "" : "approx ", player->owner ? civ : roundintby(civ, 10)); if (mil) - pr("with %s%d mil ", player->owner ? "" : "approx ", + pr("with %s%d mil ", + player->owner ? "" : "approx ", player->owner ? mil : roundintby(mil, 10)); pr("@ %s\n", xyas(x, y, player->cnum)); if (opt_HIDDEN) { diff --git a/src/lib/commands/mfir.c b/src/lib/commands/mfir.c index fc362ef9..8348f800 100644 --- a/src/lib/commands/mfir.c +++ b/src/lib/commands/mfir.c @@ -342,8 +342,8 @@ multifire(void) continue; } if (fship.shp_effic < 60) { - pr("Ship #%d is crippled (%d%%)\n", fshipno, - fship.shp_effic); + pr("Ship #%d is crippled (%d%%)\n", + fshipno, fship.shp_effic); continue; } range = effrange(fship.shp_frnge, fship.shp_tech); diff --git a/src/lib/commands/move.c b/src/lib/commands/move.c index e32d91de..ae4f4144 100644 --- a/src/lib/commands/move.c +++ b/src/lib/commands/move.c @@ -170,8 +170,9 @@ move(void) } amt_src = start.sct_item[vtype]; if (amt_src < amount) { - pr("Only %d %s left in %s!\n", amt_src, - ip->i_name, xyas(start.sct_x, start.sct_y, player->cnum)); + pr("Only %d %s left in %s!\n", + amt_src, ip->i_name, + xyas(start.sct_x, start.sct_y, player->cnum)); amount = amt_src; amt_src = 0; } else diff --git a/src/lib/commands/orde.c b/src/lib/commands/orde.c index 72fe1d97..23c3bb35 100644 --- a/src/lib/commands/orde.c +++ b/src/lib/commands/orde.c @@ -451,14 +451,14 @@ sorde(void) if (ship.shp_autonav & AN_AUTONAV) { /* Destination 1 */ - prxy(" %3d,%-3d", ship.shp_destx[1], - ship.shp_desty[1], player->cnum); + prxy(" %3d,%-3d", + ship.shp_destx[1], ship.shp_desty[1], player->cnum); /* Destination 2 */ if ((ship.shp_destx[1] != ship.shp_destx[0]) || (ship.shp_desty[1] != ship.shp_desty[0])) { - prxy(" %3d,%-3d", ship.shp_destx[0], - ship.shp_desty[0], player->cnum); + prxy(" %3d,%-3d", + ship.shp_destx[0], ship.shp_desty[0], player->cnum); } else pr(" "); diff --git a/src/lib/commands/rang.c b/src/lib/commands/rang.c index 702be1c6..cfb78226 100644 --- a/src/lib/commands/rang.c +++ b/src/lib/commands/rang.c @@ -62,8 +62,8 @@ range(void) continue; plane.pln_range = (plane.pln_range_max < i) ? plane.pln_range_max : i; - pr("Plane %d range changed to %d\n", plane.pln_uid, - plane.pln_range); + pr("Plane %d range changed to %d\n", + plane.pln_uid, plane.pln_range); putplane(plane.pln_uid, &plane); } @@ -96,8 +96,8 @@ lrange(void) if ((i = atoi(p)) < 0) continue; land.lnd_rad_max = (i < land.lnd_rad) ? i : land.lnd_rad; - pr("%s reaction radius changed to %d\n", prland(&land), - land.lnd_rad_max); + pr("%s reaction radius changed to %d\n", + prland(&land), land.lnd_rad_max); putland(land.lnd_uid, &land); } diff --git a/src/lib/commands/sona.c b/src/lib/commands/sona.c index aa32feea..75c7308a 100644 --- a/src/lib/commands/sona.c +++ b/src/lib/commands/sona.c @@ -191,12 +191,12 @@ sona(void) prship(&targ), xyas(targ.shp_x, targ.shp_y, player->cnum)); else - pr("Sonar detects %s %s @ %s\n", cname(targ.shp_own), - prship(&targ), + pr("Sonar detects %s %s @ %s\n", + cname(targ.shp_own), prship(&targ), xyas(targ.shp_x, targ.shp_y, player->cnum)); } else - pr("Sonar detects %s %s @ %s\n", cname(targ.shp_own), - prship(&targ), + pr("Sonar detects %s %s @ %s\n", + cname(targ.shp_own), prship(&targ), xyas(targ.shp_x, targ.shp_y, player->cnum)); if (targ.shp_visib > vis[y][x]) { @@ -295,8 +295,8 @@ plane_sona(struct emp_qelem *plane_list, int x, int y, 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), - prship(targ), + mpr(pp->pln_own, "%s %s @ %s\n", + cname(targ->shp_own), prship(targ), xyas(targ->shp_x, targ->shp_y, pp->pln_own)); } } diff --git a/src/lib/commands/torp.c b/src/lib/commands/torp.c index 2a8e22ca..37bc837b 100644 --- a/src/lib/commands/torp.c +++ b/src/lib/commands/torp.c @@ -109,8 +109,8 @@ torp(void) continue; } if ((mchr[(int)sub.shp_type].m_flags & M_TORP) == 0) { - pr("Ship # %d: A %s can't fire torpedoes!\n", sub.shp_uid, - mchr[(int)sub.shp_type].m_name); + pr("Ship # %d: A %s can't fire torpedoes!\n", + sub.shp_uid, mchr[(int)sub.shp_type].m_name); continue; } shells = sub.shp_item[I_SHELL]; diff --git a/src/lib/commands/trad.c b/src/lib/commands/trad.c index f942d4b6..f9933c8d 100644 --- a/src/lib/commands/trad.c +++ b/src/lib/commands/trad.c @@ -114,8 +114,8 @@ trad(void) TRADE_DELAY / 3600.0 - (now - trade.trd_markettime) / 3600.0; if (tleft < 0.0) tleft = 0.0; - pr("$%7ld %2d %5.2f hrs ", trade.trd_price, - trade.trd_maxbidder, tleft); + pr("$%7ld %2d %5.2f hrs ", + trade.trd_price, trade.trd_maxbidder, tleft); (void)trade_desc(&trade, &tg); /* XXX */ pr("\n"); if (trade.trd_owner == player->cnum && !player->god) diff --git a/src/lib/commands/upgr.c b/src/lib/commands/upgr.c index f88a9cc5..90d7623b 100644 --- a/src/lib/commands/upgr.c +++ b/src/lib/commands/upgr.c @@ -128,8 +128,8 @@ lupgr(void) continue; } if (land.lnd_tech >= tlev) { - pr("%s tech: %d, yours is only %d\n", prland(&land), - land.lnd_tech, tlev); + pr("%s tech: %d, yours is only %d\n", + prland(&land), land.lnd_tech, tlev); continue; } cost = lp->l_cost * UPGR_COST / 100; @@ -149,8 +149,8 @@ lupgr(void) putland(land.lnd_uid, &land); putsect(§); player->dolcost += cost; - pr("%s upgraded to tech %d, at a cost of %d\n", prland(&land), - land.lnd_tech, cost); + pr("%s upgraded to tech %d, at a cost of %d\n", + prland(&land), land.lnd_tech, cost); if (land.lnd_own != player->cnum) wu(0, land.lnd_own, "%s upgraded by %s to tech %d, at a cost of %d\n", @@ -212,8 +212,8 @@ supgr(void) continue; } if (ship.shp_tech >= tlev) { - pr("%s tech: %d, yours is only %d\n", prship(&ship), - ship.shp_tech, tlev); + pr("%s tech: %d, yours is only %d\n", + prship(&ship), ship.shp_tech, tlev); continue; } cost = mp->m_cost * UPGR_COST / 100; @@ -232,8 +232,8 @@ supgr(void) putship(ship.shp_uid, &ship); putsect(§); player->dolcost += cost; - pr("%s upgraded to tech %d, at a cost of %d\n", prship(&ship), - ship.shp_tech, cost); + pr("%s upgraded to tech %d, at a cost of %d\n", + prship(&ship), ship.shp_tech, cost); if (ship.shp_own != player->cnum) wu(0, ship.shp_own, "%s upgraded by %s to tech %d, at a cost of %d\n", @@ -295,8 +295,8 @@ pupgr(void) continue; } if (plane.pln_tech >= tlev) { - pr("%s tech: %d, yours is only %d\n", prplane(&plane), - plane.pln_tech, tlev); + pr("%s tech: %d, yours is only %d\n", + prplane(&plane), plane.pln_tech, tlev); continue; } cost = pp->pl_cost * UPGR_COST / 100; @@ -320,8 +320,8 @@ pupgr(void) putplane(plane.pln_uid, &plane); putsect(§); player->dolcost += cost; - pr("%s upgraded to tech %d, at a cost of %d\n", prplane(&plane), - plane.pln_tech, cost); + pr("%s upgraded to tech %d, at a cost of %d\n", + prplane(&plane), plane.pln_tech, cost); if (plane.pln_own != player->cnum) wu(0, plane.pln_own, "%s upgraded by %s to tech %d, at a cost of %d\n", diff --git a/src/lib/common/wantupd.c b/src/lib/common/wantupd.c index 1e71bf6b..e85e76ec 100644 --- a/src/lib/common/wantupd.c +++ b/src/lib/common/wantupd.c @@ -184,7 +184,8 @@ demand_check(void) return 1; } -/* Check if enough countries want an update, +/* + * Check if enough countries want an update, * and if demand updates are allowed now. */ int @@ -198,7 +199,8 @@ demandupdatecheck(void) return demand_check(); } -/* Is it time for a regular or scheduled update? +/* + * Is it time for a regular or scheduled update? * As well, if none of the above, check to see if * a demand update can occur. */ @@ -230,7 +232,8 @@ updatetime(time_t *now) return 0; } -/* Return the time, and delta seconds, of the next update. +/* + * Return the time, and delta seconds, of the next update. * If the policy is no regular updates, return the time of * the next possible check. */ diff --git a/src/lib/empthread/ntthread.c b/src/lib/empthread/ntthread.c index 5a6a738b..0fb8c4cc 100644 --- a/src/lib/empthread/ntthread.c +++ b/src/lib/empthread/ntthread.c @@ -437,8 +437,8 @@ empth_create(int prio, void (*entry)(void *), int size, int flags, pThread = malloc(sizeof(*pThread)); if (!pThread) { - logerror("not enough memory to create thread: %s (%s)", name, - desc); + logerror("not enough memory to create thread: %s (%s)", + name, desc); return NULL; } memset(pThread, 0, sizeof(*pThread)); @@ -457,8 +457,8 @@ empth_create(int prio, void (*entry)(void *), int size, int flags, pThread->ulThreadID = _beginthread(empth_threadMain, size, pThread); if (pThread->ulThreadID == -1) { - logerror("can not create thread: %s (%s): %s", name, desc, - strerror(errno)); + logerror("can not create thread: %s (%s): %s", + name, desc, strerror(errno)); goto bad; } diff --git a/src/lib/empthread/pthread.c b/src/lib/empthread/pthread.c index fce8619e..6ada23fd 100644 --- a/src/lib/empthread/pthread.c +++ b/src/lib/empthread/pthread.c @@ -91,7 +91,8 @@ static void **udata; */ static pthread_mutex_t mtx_ctxsw; -static void empth_status(char *format, ...) ATTRIBUTE((format (printf, 1, 2))); +static void empth_status(char *format, ...) + ATTRIBUTE((format (printf, 1, 2))); static void empth_alarm(int sig); static void * @@ -163,7 +164,6 @@ empth_init(void **ctx_ptr, int flags) empth_t *ctx; struct sigaction act; - pthread_key_create(&ctx_key, NULL); pthread_mutex_init(&mtx_ctxsw, NULL); @@ -211,8 +211,8 @@ empth_create(int prio, void (*entry)(void *), int size, int flags, ctx = malloc(sizeof(empth_t)); if (!ctx) { - logerror("not enough memory to create thread: %s (%s)", name, - desc); + logerror("not enough memory to create thread: %s (%s)", + name, desc); return NULL; } ctx->name = strdup(name); @@ -223,8 +223,8 @@ empth_create(int prio, void (*entry)(void *), int size, int flags, eno = pthread_attr_init(&attr); if (eno) { - logerror("can not create thread attribute %s (%s): %s", name, desc, - strerror(eno)); + logerror("can not create thread attribute %s (%s): %s", + name, desc, strerror(eno)); goto bad; } if (size < PTHREAD_STACK_MIN) @@ -234,8 +234,8 @@ empth_create(int prio, void (*entry)(void *), int size, int flags, eno = pthread_create(&t, &attr, empth_start, ctx); if (eno) { - logerror("can not create thread: %s (%s): %s", name, desc, - strerror(eno)); + logerror("can not create thread: %s (%s): %s", + name, desc, strerror(eno)); goto bad; } empth_status("new thread id is %ld", (long)t); diff --git a/src/lib/player/accept.c b/src/lib/player/accept.c index 4c8b722f..d2f8ae0e 100644 --- a/src/lib/player/accept.c +++ b/src/lib/player/accept.c @@ -204,7 +204,7 @@ player_accept(void *unused) empth_select(s, EMPTH_FD_READ); len = player_addrlen; ns = accept(s, sap, &len); - /* FIXME accept() can block on some systems (RST after select() reported s ready) */ + /* FIXME accept() can block on some systems (RST after select() reports ready) */ if (ns < 0) { logerror("new socket accept"); continue; diff --git a/src/lib/subs/aircombat.c b/src/lib/subs/aircombat.c index d43136b4..106e4eae 100644 --- a/src/lib/subs/aircombat.c +++ b/src/lib/subs/aircombat.c @@ -313,8 +313,8 @@ ac_encounter(struct emp_qelem *bomb_list, struct emp_qelem *esc_list, oesc); gotilist[cn]++; } - PR(plane_owner, "Flying over %s ships in %s\n", cname(cn), - xyas(x, y, plane_owner)); + PR(plane_owner, "Flying over %s ships in %s\n", + cname(cn), xyas(x, y, plane_owner)); /* This makes going for ships in harbors tough */ if (!evaded) { /* We already fired flak up above. Now we intercept again if we haven't already */ @@ -494,10 +494,10 @@ ac_intercept(struct emp_qelem *bomb_list, struct emp_qelem *esc_list, } if (icount == 0) return; - PR(plane_owner, "%d %s fighter%s rising to intercept!\n", icount, - cname(def_own), icount == 1 ? " is" : "s are"); - PR(def_own, "%d fighter%s intercepting %s planes!\n", icount, - icount == 1 ? " is" : "s are", cname(plane_owner)); + PR(plane_owner, "%d %s fighter%s rising to intercept!\n", + icount, cname(def_own), icount == 1 ? " is" : "s are"); + PR(def_own, "%d fighter%s intercepting %s planes!\n", + icount, icount == 1 ? " is" : "s are", cname(plane_owner)); ac_combat_headers(plane_owner, def_own); ac_airtoair(esc_list, &int_list); ac_airtoair(bomb_list, &int_list); diff --git a/src/lib/subs/attsub.c b/src/lib/subs/attsub.c index f85a8e28..96d9f68d 100644 --- a/src/lib/subs/attsub.c +++ b/src/lib/subs/attsub.c @@ -515,8 +515,8 @@ att_abort(int combat_mode, struct combat *off, struct combat *def) } if (off && def->sct_dcp->d_mcst <= 0) { - pr("You can't %s a %s sector!\n", att_mode[combat_mode], - def->sct_dcp->d_name); + pr("You can't %s a %s sector!\n", + att_mode[combat_mode], def->sct_dcp->d_name); return abort_attack(); } if (!off || off->relations_checked) diff --git a/src/lib/subs/chkmoney.c b/src/lib/subs/chkmoney.c index e4c73c1e..15771b82 100644 --- a/src/lib/subs/chkmoney.c +++ b/src/lib/subs/chkmoney.c @@ -75,8 +75,8 @@ check_cost(int looping, int cost, long cash, int *warnedp, if (looping && cash > 0 && player->dolcost > cash / 2 && *warnedp < 1) { *warnedp = 1; pr("WARNING. You have just spent over half of your money.\n"); - pr("You started with $%ld and now you only have $%ld left\n", cash, - cash - (long)player->dolcost); + pr("You started with $%ld and now you only have $%ld left\n", + cash, cash - (long)player->dolcost); } return 0; } diff --git a/src/lib/subs/move.c b/src/lib/subs/move.c index 2f893a1a..7a171534 100644 --- a/src/lib/subs/move.c +++ b/src/lib/subs/move.c @@ -168,8 +168,7 @@ move_ground(struct sctstr *start, struct sctstr *end, break; else if (dir == DIR_VIEW) { pr("%d%% %s with %d civilians.\n", sect.sct_effic, - dchr[sect.sct_type].d_name, - sect.sct_item[I_CIVIL]); + dchr[sect.sct_type].d_name, sect.sct_item[I_CIVIL]); continue; } /* diff --git a/src/lib/subs/mslsub.c b/src/lib/subs/mslsub.c index 471f6498..95e8d399 100644 --- a/src/lib/subs/mslsub.c +++ b/src/lib/subs/mslsub.c @@ -334,8 +334,8 @@ msl_intercept(coord x, coord y, natid bombown, int hardtarget, if (!destroyed && msl_hit(pp, hardtarget, EF_PLANE, news_item, news_item, att_name, x, y, bombown)) { - mpr(bombown, "%s destroyed by %s %s!\n", att_name, - cname(pp->pln_own), def_name); + mpr(bombown, "%s destroyed by %s %s!\n", + att_name, cname(pp->pln_own), def_name); if (sect.sct_own) mpr(sect.sct_own, "%s %s intercepted!\n", who, att_name); if (sect.sct_own != pp->pln_own) @@ -360,8 +360,8 @@ msl_intercept(coord x, coord y, natid bombown, int hardtarget, if (destroyed) return destroyed; if (icount) { - mpr(bombown, "%s made it through %s defenses!\n", att_name, - def_name); + mpr(bombown, "%s made it through %s defenses!\n", + att_name, def_name); if (sect.sct_own) mpr(sect.sct_own, "%s made it through %s defenses!\n", att_name, def_name); diff --git a/src/lib/subs/nuke.c b/src/lib/subs/nuke.c index 18cf0485..ad3eed3c 100644 --- a/src/lib/subs/nuke.c +++ b/src/lib/subs/nuke.c @@ -51,8 +51,8 @@ nuk_postread(int n, void *ptr) struct plnstr plane; if (np->nuk_uid != n) { - logerror("nuk_postread: Error - %d != %d, zeroing.\n", np->nuk_uid, - n); + logerror("nuk_postread: Error - %d != %d, zeroing.\n", + np->nuk_uid, n); memset(np, 0, sizeof(struct nukstr)); } diff --git a/src/lib/subs/plane.c b/src/lib/subs/plane.c index add542da..02a7b265 100644 --- a/src/lib/subs/plane.c +++ b/src/lib/subs/plane.c @@ -51,8 +51,8 @@ pln_postread(int n, void *ptr) struct lndstr theland; if (pp->pln_uid != n) { - logerror("pln_postread: Error - %d != %d, zeroing.\n", pp->pln_uid, - n); + logerror("pln_postread: Error - %d != %d, zeroing.\n", + pp->pln_uid, n); memset(pp, 0, sizeof(struct plnstr)); } diff --git a/src/lib/subs/plnsub.c b/src/lib/subs/plnsub.c index 0735fba5..9830db81 100644 --- a/src/lib/subs/plnsub.c +++ b/src/lib/subs/plnsub.c @@ -240,15 +240,14 @@ pln_newlanding(struct emp_qelem *list, coord tx, coord ty, int cno) pr("\t%s cannot land on ship #%d! %s aborts!\n", prplane(&plp->plane), cno, prplane(&plp->plane)); else if (!put_plane_on_ship(&plp->plane, &ship)) - pr("\tNo room on ship #%d! %s aborts!\n", cno, - prplane(&plp->plane)); + pr("\tNo room on ship #%d! %s aborts!\n", + cno, prplane(&plp->plane)); else { if (plp->plane.pln_own != ship.shp_own) { /* plp->plane.pln_own = ship.shp_own;*/ - wu(0, ship.shp_own, - "%s %s lands on your %s\n", - cname(player->cnum), - prplane(&plp->plane), prship(&ship)); + wu(0, ship.shp_own, "%s %s lands on your %s\n", + cname(player->cnum), prplane(&plp->plane), + prship(&ship)); } } } else { diff --git a/src/lib/subs/rej.c b/src/lib/subs/rej.c index 4d1ae3d8..66f91ed1 100644 --- a/src/lib/subs/rej.c +++ b/src/lib/subs/rej.c @@ -119,8 +119,8 @@ setrel(natid us, natid them, int rel) if (addendum && us == player->cnum && !update_pending) pr("%s\n", addendum); - mpr(us, "Diplomatic relations with %s %s to \"%s\".\n", themname, - whichway, relates[rel]); + mpr(us, "Diplomatic relations with %s %s to \"%s\".\n", + themname, whichway, relates[rel]); if (!(getrejects(us, themnp) & REJ_TELE)) mpr(them, "Country %s (#%d) has %s their relations with you to \"%s\"!\n", diff --git a/src/lib/subs/retreat.c b/src/lib/subs/retreat.c index ea9ecce9..2902f0f9 100644 --- a/src/lib/subs/retreat.c +++ b/src/lib/subs/retreat.c @@ -312,8 +312,8 @@ retreat_ship1(struct shpstr *sp, char code, int orig) } if (orig) { - wu(0, sp->shp_own, "%s %s, and retreated to %s\n", prship(sp), - conditions[findcondition(code)].desc[orig], + wu(0, sp->shp_own, "%s %s, and retreated to %s\n", + prship(sp), conditions[findcondition(code)].desc[orig], xyas(sp->shp_x, sp->shp_y, sp->shp_own)); } else { wu(0, sp->shp_own, "%s %s, and ended up at %s\n", diff --git a/src/lib/subs/satmap.c b/src/lib/subs/satmap.c index c9660042..bd6f0368 100644 --- a/src/lib/subs/satmap.c +++ b/src/lib/subs/satmap.c @@ -86,8 +86,8 @@ satmap(int x, int y, int eff, int range, int flags, int type) } range = range * (eff / 100.0); - pr("%s efficiency %d%%, max range %d\n", xyas(x, y, player->cnum), - eff, range); + pr("%s efficiency %d%%, max range %d\n", + xyas(x, y, player->cnum), eff, range); memset(noise, 0, sizeof(noise)); if (eff < 100) { pr("Some noise on the transmission...\n"); @@ -334,8 +334,8 @@ satdisp(struct sctstr *sp, int acc, int showstuff) first = 0; } - pr("\t%4d %4d %-16.16s ", land.lnd_own, land.lnd_uid, - lchr[(int)land.lnd_type].l_name); + pr("\t%4d %4d %-16.16s ", + land.lnd_own, land.lnd_uid, lchr[(int)land.lnd_type].l_name); prxy("%4d,%-4d ", land.lnd_x, land.lnd_y, player->cnum); pr("%3d%%\n", land.lnd_effic); } diff --git a/src/lib/subs/ship.c b/src/lib/subs/ship.c index a34cb83f..317c6a43 100644 --- a/src/lib/subs/ship.c +++ b/src/lib/subs/ship.c @@ -50,8 +50,8 @@ shp_postread(int n, void *ptr) struct shpstr *sp = ptr; if (sp->shp_uid != n) { - logerror("shp_postread: Error - %d != %d, zeroing.\n", sp->shp_uid, - n); + logerror("shp_postread: Error - %d != %d, zeroing.\n", + sp->shp_uid, n); memset(sp, 0, sizeof(struct shpstr)); } diff --git a/src/lib/subs/show.c b/src/lib/subs/show.c index faf677ed..68667c2b 100644 --- a/src/lib/subs/show.c +++ b/src/lib/subs/show.c @@ -518,8 +518,8 @@ show_sect_build(int foo) pr("Infrastructure building - adding 1 point of efficiency costs:\n"); pr(" type lcms hcms mobility $$$$\n"); for (x = 0; intrchr[x].in_name; x++) { - pr("%-20s %4d %4d %8d %4d\n", intrchr[x].in_name, - intrchr[x].in_lcms, intrchr[x].in_hcms, + pr("%-20s %4d %4d %8d %4d\n", + intrchr[x].in_name, intrchr[x].in_lcms, intrchr[x].in_hcms, intrchr[x].in_mcost, intrchr[x].in_dcost); } } @@ -569,8 +569,8 @@ show_sect_capab(int foo) j = dchr[x].d_prd; - pr("%c %-23s %-7s ", dchr[x].d_mnem, dchr[x].d_name, - pchr[j].p_sname); + pr("%c %-23s %-7s ", + dchr[x].d_mnem, dchr[x].d_name, pchr[j].p_sname); (void)CANT_HAPPEN(MAXPRCON > 3); /* output has only three columns */ for (i = 0; i < 3; i++) { if (i < MAXPRCON diff --git a/src/lib/subs/trdsub.c b/src/lib/subs/trdsub.c index 542fd271..bfa3f059 100644 --- a/src/lib/subs/trdsub.c +++ b/src/lib/subs/trdsub.c @@ -168,8 +168,8 @@ trade_desc(struct trdstr *tp, union trdgenstr *tgp) } getsect(sp->shp_x, sp->shp_y, §); if (sect.sct_type != SCT_WATER) - pr(" in a %s %s", cname(sect.sct_own), - dchr[sect.sct_type].d_name); + pr(" in a %s %s", + cname(sect.sct_own), dchr[sect.sct_type].d_name); else pr(" at sea"); break; diff --git a/src/lib/update/nav_ship.c b/src/lib/update/nav_ship.c index 13e6ff9d..22211700 100644 --- a/src/lib/update/nav_ship.c +++ b/src/lib/update/nav_ship.c @@ -61,8 +61,8 @@ scuttle_it(struct shpstr *sp) sp->shp_autonav &= ~AN_SCUTTLE; if (!(sectp = getsectp(sp->shp_x, sp->shp_y))) { - wu(0, 0, "bad sector (%d,%d) ship %d\n", sp->shp_x, sp->shp_y, - sp->shp_uid); + wu(0, 0, "bad sector (%d,%d) ship %d\n", + sp->shp_x, sp->shp_y, sp->shp_uid); return; } if (sectp->sct_type != SCT_HARBR || sectp->sct_effic < 2) { diff --git a/src/server/shutdown.c b/src/server/shutdown.c index a40200d3..00f107ec 100644 --- a/src/server/shutdown.c +++ b/src/server/shutdown.c @@ -79,8 +79,8 @@ shutdown_sequence(void *unused) } else if (shutdown_pending == 1) { pr_wall("%sServer shutting down in 1 minute!\n", header); } else if (shutdown_pending <= 5) { - pr_wall("%sServer shutting down in %d minutes!\n", header, - shutdown_pending); + pr_wall("%sServer shutting down in %d minutes!\n", + header, shutdown_pending); } else if (shutdown_pending <= 60 && shutdown_pending % 10 == 0) { pr_wall("%sThe server will be shutting down in %d minutes!\n",