diff options
author | John Baldwin <jhb@FreeBSD.org> | 2009-08-19 15:17:13 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2009-08-19 15:17:13 +0000 |
commit | fcaeaff4b6aad1829edba34184950a3b3a9a403d (patch) | |
tree | 98e1ab276a80a7ccc05802cc9a5c10b4b31adcdf /contrib/top/display.c | |
parent | 35d01728c65d765dec0bdfc48eeaf255abf44371 (diff) | |
download | src-fcaeaff4b6aad1829edba34184950a3b3a9a403d.tar.gz src-fcaeaff4b6aad1829edba34184950a3b3a9a403d.zip |
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)
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=196382
Diffstat (limited to 'contrib/top/display.c')
-rw-r--r-- | contrib/top/display.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/top/display.c b/contrib/top/display.c index 0b1226ce03d3..3fca57b5fdc7 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') |