]> git.pond.sub.org Git - empserver/commitdiff
Make budget's "Sector building" line look better
authorMarkus Armbruster <armbru@pond.sub.org>
Fri, 20 Feb 2009 18:47:28 +0000 (19:47 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 19 Jul 2009 17:58:47 +0000 (13:58 -0400)
Number of sectors were not aligned with the other lines.  While there,
print properly plurized "sector" instead of "sct(s)".

info/budget.t
src/lib/commands/budg.c

index 872b11037f25ba8110a66634d2fd847ddb4ee850..dee120906fe2bf3346c6fa4e745aee85092150d8 100644 (file)
@@ -21,7 +21,7 @@ Ship building                   2 ships                            480
 Ship maintenance                25 ships                           6327
 Plane building                  9 planes                           2508
 Plane maintenance               219 planes                         8874
-Sector building                                                     2398
+Sector building                        25 sectors                          2398
 Sector maintenance             5 sectors                            300
 Military payroll                7648 mil, 338 res                  38247
 Total expenses....................................................147490
index 2a40b033ae325da21f01cd1b892a4d4bfe734d85..867bc7c9f0afcdaeb640129567307e293a578bf9 100644 (file)
@@ -133,8 +133,10 @@ budg(void)
     }
 
     if (p_sect[SCT_EFFIC][1]) {
-       pr("Sector building\t\t\t\t%8ld sct(s)\t\t%8ld\n",
-          p_sect[SCT_EFFIC][0], p_sect[SCT_EFFIC][1]);
+       sprintf(buf, "%ld sector%s",
+               p_sect[SCT_EFFIC][0], splur(p_sect[SCT_EFFIC][0]));
+       pr("Sector building\t\t\t%-16s\t\t%8ld\n",
+          buf, p_sect[SCT_EFFIC][1]);
        expenses += p_sect[SCT_EFFIC][1];
     }
     if (p_sect[SCT_MAINT][0]) {