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 <armbru@pond.sub.org>
This commit is contained in:
parent
3e7542a9ab
commit
3abfde408d
1 changed files with 4 additions and 4 deletions
|
@ -305,11 +305,11 @@ show_mission(struct nstr_item *np)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (first) {
|
if (first) {
|
||||||
pr("Thing x,y op-sect rad mission\n");
|
pr("Thing x,y op-sect rad mission\n");
|
||||||
first = 0;
|
first = 0;
|
||||||
}
|
}
|
||||||
pr("%-25s", unit_nameof(gp));
|
pr("%-25s", unit_nameof(gp));
|
||||||
prxy(" %3d,%-3d", gp->x, gp->y);
|
prxy(" %4d,%-4d", gp->x, gp->y);
|
||||||
switch (gp->mission) {
|
switch (gp->mission) {
|
||||||
case MI_INTERDICT:
|
case MI_INTERDICT:
|
||||||
case MI_SUPPORT:
|
case MI_SUPPORT:
|
||||||
|
@ -318,8 +318,8 @@ show_mission(struct nstr_item *np)
|
||||||
case MI_AIR_DEFENSE:
|
case MI_AIR_DEFENSE:
|
||||||
case MI_DSUPPORT:
|
case MI_DSUPPORT:
|
||||||
case MI_OSUPPORT:
|
case MI_OSUPPORT:
|
||||||
prxy(" %3d,%-3d", gp->opx, gp->opy);
|
prxy(" %4d,%-4d", gp->opx, gp->opy);
|
||||||
pr(" %4d", gp->radius);
|
pr(" %3d", gp->radius);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
CANT_REACH();
|
CANT_REACH();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue