From 46208d409cbb82e3c4d15e201d9ece5bd4f45785 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Wed, 19 Aug 2009 17:45:58 +0000 Subject: [PATCH] MFC 196382: Explicitly line up the CPU state labels with the calculated starting column that takes into account the width of the largest CPU ID. On systems with > 10 CPUs the labels for the first 10 CPUs were not lined up properly otherwise. Approved by: re (kib) --- contrib/top/display.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/top/display.c b/contrib/top/display.c index 0b1226ce03d..3fca57b5fdc 100644 --- a/contrib/top/display.c +++ b/contrib/top/display.c @@ -452,6 +452,7 @@ for (cpu = 0; cpu < num_cpus; cpu++) { lastline++; /* now walk thru the names and print the line */ + Move_to(cpustates_column, y_cpustates + cpu); while ((thisname = *names++) != NULL) { if (*thisname != '\0') @@ -543,6 +544,7 @@ for (cpu = 0; cpu < num_cpus; cpu++) { printf("\nCPU %d: ", cpu); lastline++; + Move_to(cpustates_column, y_cpustates + cpu); while ((thisname = *names++) != NULL) { if (*thisname != '\0')