From: Markus Armbruster Date: Sun, 26 May 2013 09:08:37 +0000 (+0200) Subject: mission: Widen coordinate columns to four characters X-Git-Tag: v4.3.32~94 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=3abfde408d520461e84c60fbe502fd11912263ee mission: Widen coordinate columns to four characters When formatting coordinates for fixed-width output, the width should be at least four characters. Columns x,y and op-sect use three. Has always been that way. Widen them both to four. This cleans up output for world sizes between 200 and 1998. Signed-off-by: Markus Armbruster --- diff --git a/src/lib/commands/miss.c b/src/lib/commands/miss.c index d1ca08193..a847578af 100644 --- a/src/lib/commands/miss.c +++ b/src/lib/commands/miss.c @@ -305,11 +305,11 @@ show_mission(struct nstr_item *np) continue; if (first) { - pr("Thing x,y op-sect rad mission\n"); + pr("Thing x,y op-sect rad mission\n"); first = 0; } pr("%-25s", unit_nameof(gp)); - prxy(" %3d,%-3d", gp->x, gp->y); + prxy(" %4d,%-4d", gp->x, gp->y); switch (gp->mission) { case MI_INTERDICT: case MI_SUPPORT: @@ -318,8 +318,8 @@ show_mission(struct nstr_item *np) case MI_AIR_DEFENSE: case MI_DSUPPORT: case MI_OSUPPORT: - prxy(" %3d,%-3d", gp->opx, gp->opy); - pr(" %4d", gp->radius); + prxy(" %4d,%-4d", gp->opx, gp->opy); + pr(" %3d", gp->radius); break; default: CANT_REACH();