]> git.pond.sub.org Git - empserver/commitdiff
cutoff level: Add FIXME comments to narrow coordinate columns
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 26 May 2013 09:31:21 +0000 (11:31 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 27 May 2013 06:09:23 +0000 (08:09 +0200)
When formatting coordinates for fixed-width output, the width should
be at least four characters.

cutoff was fine until 4.0.2 reduced coordinate width to three to make
space for civilian and military delivery thresholds.

level has always used width three.

Can't fix either without making lines too long or dropping
information, so just document the problem for now.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/commands/cuto.c
src/lib/commands/leve.c

index b47a98431aef6a67a67a6bbf490a1cd81a108354..382d989741cd30ec9e6be71ab9de88cf17cd4f64 100644 (file)
@@ -62,7 +62,7 @@ cuto(void)
        }
        if (player->god)
            pr("%3d", sect.sct_own);
        }
        if (player->god)
            pr("%3d", sect.sct_own);
-       prxy("%3d,%-3d", nstr.x, nstr.y);
+       prxy("%3d,%-3d", nstr.x, nstr.y); /* FIXME too narrow */
        pr(" %c ", dchr[sect.sct_type].d_mnem);
        pr("%c", dirstr[sect.sct_del[I_CIVIL] & 0x7]);
        pr("%c", dirstr[sect.sct_del[I_MILIT] & 0x7]);
        pr(" %c ", dchr[sect.sct_type].d_mnem);
        pr("%c", dirstr[sect.sct_del[I_CIVIL] & 0x7]);
        pr("%c", dirstr[sect.sct_del[I_MILIT] & 0x7]);
index 68d0b3a7707e735cca866a3cdba76ade06a43d01..0624281ea0149f53083bd2141cd35525109da08e 100644 (file)
@@ -56,9 +56,9 @@ leve(void)
        }
        if (player->god)
            pr("%2d ", sect.sct_own);
        }
        if (player->god)
            pr("%2d ", sect.sct_own);
-       prxy("%3d,%-3d", nstr.x, nstr.y);
+       prxy("%3d,%-3d", nstr.x, nstr.y); /* FIXME too narrow */
        pr(" %c ", dchr[sect.sct_type].d_mnem);
        pr(" %c ", dchr[sect.sct_type].d_mnem);
-       prxy("%3d,%-3d", sect.sct_dist_x, sect.sct_dist_y);
+       prxy("%3d,%-3d", sect.sct_dist_x, sect.sct_dist_y); /* FIXME too */
        pr(" %4d", sect.sct_dist[I_CIVIL]);
        pr("%4d", sect.sct_dist[I_MILIT]);
        pr("%4d", sect.sct_dist[I_UW]);
        pr(" %4d", sect.sct_dist[I_CIVIL]);
        pr("%4d", sect.sct_dist[I_MILIT]);
        pr("%4d", sect.sct_dist[I_UW]);