From 3e7542a9abf334a2a92c6cd274c21dfd6acf5e12 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 26 May 2013 10:58:23 +0200 Subject: [PATCH] sorder: Widen coordinate columns to four characters When formatting coordinates for fixed-width output, the width should be at least four characters. Columns x,y, start and end use three. Has always been that way, except for end, which used two until commit e07fb30 (v4.2.13). Widen them all to four. This cleans up output for world sizes between 200 and 1998. Signed-off-by: Markus Armbruster --- src/lib/commands/orde.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/lib/commands/orde.c b/src/lib/commands/orde.c index 613d3690d..3f8ce60e7 100644 --- a/src/lib/commands/orde.c +++ b/src/lib/commands/orde.c @@ -397,27 +397,26 @@ sorde(void) if (!nships) { /* 1st ship, print banner */ if (player->god) pr("own "); - pr("shp# ship type x,y "); - pr("start end "); - pr("len eta\n"); + pr("shp# ship type x,y start end " + " len eta\n"); } nships++; if (player->god) pr("%3d ", ship.shp_own); pr("%4d", nb.cur); pr(" %-16.16s", mchr[(int)ship.shp_type].m_name); - prxy(" %3d,%-3d", ship.shp_x, ship.shp_y); + prxy(" %4d,%-4d", ship.shp_x, ship.shp_y); if (ship.shp_autonav & AN_AUTONAV) { /* Destination 1 */ - prxy(" %3d,%-3d", ship.shp_destx[1], ship.shp_desty[1]); + prxy(" %4d,%-4d", ship.shp_destx[1], ship.shp_desty[1]); /* 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]); + prxy(" %4d,%-4d", ship.shp_destx[0], ship.shp_desty[0]); } else - pr(" "); + pr(" "); if (ship.shp_autonav & AN_STANDBY) pr(" suspended"); -- 2.43.0