land: Separate columns x,y and a in output properly

Coordinates run into army when the y coordinate is wider than three
characters.  Has always been broken.  Insert a separating space.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2013-05-25 19:59:19 +02:00
parent 48912d3c0b
commit adc66a65a6
2 changed files with 29 additions and 28 deletions

View file

@ -28,6 +28,7 @@
* *
* Known contributors to this file: * Known contributors to this file:
* Steve McClure, 1998 * Steve McClure, 1998
* Markus Armbruster, 2004-2013
*/ */
#include <config.h> #include <config.h>
@ -54,7 +55,7 @@ land(void)
if (nunits++ == 0) { if (nunits++ == 0) {
if (player->god) if (player->god)
pr("own "); pr("own ");
pr(" # unit type x,y a eff mil frt mu fd" pr(" # unit type x,y a eff mil frt mu fd"
" tch retr xl ln carry\n"); " tch retr xl ln carry\n");
} }
if (land.lnd_off) if (land.lnd_off)
@ -63,7 +64,7 @@ land(void)
pr("%3d ", land.lnd_own); pr("%3d ", land.lnd_own);
pr("%4d ", ni.cur); pr("%4d ", ni.cur);
pr("%-15.15s", lchr[(int)land.lnd_type].l_name); pr("%-15.15s", lchr[(int)land.lnd_type].l_name);
prxy(" %4d,%-4d", land.lnd_x, land.lnd_y); prxy(" %4d,%-4d ", land.lnd_x, land.lnd_y);
pr("%1.1s", &land.lnd_army); pr("%1.1s", &land.lnd_army);
pr(" %c%3d%%", land.lnd_off ? '!' : ' ', land.lnd_effic); pr(" %c%3d%%", land.lnd_off ? '!' : ' ', land.lnd_effic);
pr("%4d", land.lnd_item[I_MILIT]); pr("%4d", land.lnd_item[I_MILIT]);

View file

@ -8212,12 +8212,12 @@ CENSUS del dst
3 cs cargo ship 5,-1 20% 0 0 0 0 0 0 0 0 0 31 3 cs cargo ship 5,-1 20% 0 0 0 0 0 0 0 0 0 31
4 ships 4 ships
[0:635] Command : # unit type x,y a eff mil frt mu fd tch retr xl ln carry [0:635] Command : # unit type x,y a eff mil frt mu fd tch retr xl ln carry
0 cav cavalry 10,2 10% 0 0 0 0 31 42% 0 0 0 cav cavalry 10,2 10% 0 0 0 0 31 42% 0 0
1 cav cavalry 10,2 10% 0 0 0 0 31 42% 0 0 1 cav cavalry 10,2 10% 0 0 0 0 31 42% 0 0
2 cav cavalry 10,2 10% 0 0 0 0 31 42% 0 0 2 cav cavalry 10,2 10% 0 0 0 0 31 42% 0 0
3 cav cavalry 10,2 10% 0 0 0 0 31 42% 0 0 3 cav cavalry 10,2 10% 0 0 0 0 31 42% 0 0
4 cav cavalry 10,2 10% 0 0 0 0 31 42% 0 0 4 cav cavalry 10,2 10% 0 0 0 0 31 42% 0 0
5 units 5 units
[0:635] Command : --------00000000001111111 [0:635] Command : --------00000000001111111
@ -8919,11 +8919,11 @@ CENSUS del dst
1 cs cargo ship 5,-1 100% 300 25 0 0 0 0 0 1 90 31 1 cs cargo ship 5,-1 100% 300 25 0 0 0 0 0 1 90 31
2 ships 2 ships
[0:587] Command : # unit type x,y a eff mil frt mu fd tch retr xl ln carry [0:587] Command : # unit type x,y a eff mil frt mu fd tch retr xl ln carry
0 cav cavalry 5,-1 100% 20 0 4 0 31 42% 0 0 1S 0 cav cavalry 5,-1 100% 20 0 4 0 31 42% 0 0 1S
3 cav cavalry 5,-1 100% 1 0 4 0 31 42% 0 0 3 cav cavalry 5,-1 100% 1 0 4 0 31 42% 0 0
4 cav cavalry 10,2 100% 0 0 60 0 31 42% 0 0 4 cav cavalry 10,2 100% 0 0 60 0 31 42% 0 0
5 art artillery 10,2 10% 0 0 0 0 37 42% 0 0 5 art artillery 10,2 10% 0 0 0 0 37 42% 0 0
4 units 4 units
[0:587] Command : --------00000000001111111 [0:587] Command : --------00000000001111111
@ -10067,11 +10067,11 @@ CENSUS del dst
2 tk tanker 5,-1 20% 30 0 0 0 0 0 0 0 0 44 2 tk tanker 5,-1 20% 30 0 0 0 0 0 0 0 0 44
3 ships 3 ships
[0:622] Command : # unit type x,y a eff mil frt mu fd tch retr xl ln carry [0:622] Command : # unit type x,y a eff mil frt mu fd tch retr xl ln carry
0 cav cavalry 5,-1 100% 20 0 64 0 31 42% 0 0 1S 0 cav cavalry 5,-1 100% 20 0 64 0 31 42% 0 0 1S
3 cav cavalry 5,-1 100% 1 0 64 0 31 42% 0 0 3 cav cavalry 5,-1 100% 1 0 64 0 31 42% 0 0
4 cav cavalry 4,0 100% 5 0 75 0 31 42% 0 0 4 cav cavalry 4,0 100% 5 0 75 0 31 42% 0 0
5 art artillery 4,0 100% 5 0 -18 0 37 42% 0 0 5 art artillery 4,0 100% 5 0 -18 0 37 42% 0 0
4 units 4 units
[0:622] Command : *: No plane(s) [0:622] Command : *: No plane(s)
@ -11071,11 +11071,11 @@ CENSUS del dst
4 ft fishing tra 5,-1 20% 200 0 0 0 0 0 0 0 0 51 4 ft fishing tra 5,-1 20% 200 0 0 0 0 0 0 0 0 51
5 ships 5 ships
[0:625] Command : # unit type x,y a eff mil frt mu fd tch retr xl ln carry [0:625] Command : # unit type x,y a eff mil frt mu fd tch retr xl ln carry
0 cav cavalry 5,-1 100% 20 0 124 0 31 42% 0 0 1S 0 cav cavalry 5,-1 100% 20 0 124 0 31 42% 0 0 1S
3 cav cavalry 5,-1 100% 1 0 124 0 31 42% 0 0 3 cav cavalry 5,-1 100% 1 0 124 0 31 42% 0 0
4 cav cavalry 11,-1 100% 5 0 102 0 31 42% 0 0 4 cav cavalry 11,-1 100% 5 0 102 0 31 42% 0 0
5 art artillery 11,-1 100% 5 0 0 0 37 42% 0 0 5 art artillery 11,-1 100% 5 0 0 0 37 42% 0 0
4 units 4 units
[0:625] Command : # type x,y w eff mu def tech ran hard carry special [0:625] Command : # type x,y w eff mu def tech ran hard carry special
@ -12001,11 +12001,11 @@ CENSUS del dst
4 ft fishing tra 6,0 100% 300 0 0 0 0 0 0 0 76 51 4 ft fishing tra 6,0 100% 300 0 0 0 0 0 0 0 76 51
5 ships 5 ships
[0:611] Command : # unit type x,y a eff mil frt mu fd tch retr xl ln carry [0:611] Command : # unit type x,y a eff mil frt mu fd tch retr xl ln carry
0 cav cavalry 5,-1 100% 20 0 127 0 31 42% 0 0 1S 0 cav cavalry 5,-1 100% 20 0 127 0 31 42% 0 0 1S
3 cav cavalry 5,-1 100% 1 57 127 0 31 42% 0 0 3 cav cavalry 5,-1 100% 1 57 127 0 31 42% 0 0
4 cav cavalry 11,-1 73% 0 0 97 0 31 42% 0 0 4 cav cavalry 11,-1 73% 0 0 97 0 31 42% 0 0
5 art artillery 11,-1 98% 5 0 59 0 37 42% 0 0 5 art artillery 11,-1 98% 5 0 59 0 37 42% 0 0
4 units 4 units
[0:611] Command : # type x,y w eff mu def tech ran hard carry special [0:611] Command : # type x,y w eff mu def tech ran hard carry special