diff options
author | John Baldwin <jhb@FreeBSD.org> | 2011-02-01 15:48:27 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2011-02-01 15:48:27 +0000 |
commit | f69c3436ee5c7a85c8b3acc3802d8f1968ea2ce5 (patch) | |
tree | c875155b8c1b6978957e8e6c3378ad024f182ef5 /contrib/top | |
parent | be96a6d39baf80508cb2e7e8adf78502015573c9 (diff) | |
download | src-f69c3436ee5c7a85c8b3acc3802d8f1968ea2ce5.tar.gz src-f69c3436ee5c7a85c8b3acc3802d8f1968ea2ce5.zip |
Notes
Diffstat (limited to 'contrib/top')
-rw-r--r-- | contrib/top/display.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/contrib/top/display.c b/contrib/top/display.c index de91c6cfa45e..f0f0c2344bfc 100644 --- a/contrib/top/display.c +++ b/contrib/top/display.c @@ -447,12 +447,14 @@ for (cpu = 0; cpu < num_cpus; cpu++) { /* print tag and bump lastline */ if (num_cpus == 1) printf("\nCPU: "); - else - printf("\nCPU %d: ", cpu); + else { + value = printf("\nCPU %d: ", cpu); + while (value++ <= cpustates_column) + printf(" "); + } lastline++; /* now walk thru the names and print the line */ - Move_to(cpustates_column, y_cpustates + cpu); while ((thisname = *names++) != NULL) { if (*thisname != '\0') @@ -532,7 +534,7 @@ z_cpustates() register char **names; register char *thisname; register int *lp; - int cpu; + int cpu, value; for (cpu = 0; cpu < num_cpus; cpu++) { names = cpustate_names; @@ -540,11 +542,13 @@ for (cpu = 0; cpu < num_cpus; cpu++) { /* show tag and bump lastline */ if (num_cpus == 1) printf("\nCPU: "); - else - printf("\nCPU %d: ", cpu); + else { + value = printf("\nCPU %d: ", cpu); + while (value++ <= cpustates_column) + printf(" "); + } lastline++; - Move_to(cpustates_column, y_cpustates + cpu); while ((thisname = *names++) != NULL) { if (*thisname != '\0') |