Fix thread state summary line display after r334918.
This commit is contained in:
parent
adf7f420a1
commit
ca5deb61cb
@ -347,12 +347,12 @@ i_procstates(int total, int *brkdn)
|
|||||||
procstates_buffer = setup_buffer(procstates_buffer, 0);
|
procstates_buffer = setup_buffer(procstates_buffer, 0);
|
||||||
|
|
||||||
/* write current number of processes and remember the value */
|
/* write current number of processes and remember the value */
|
||||||
printf("%d %s:", total, (ps.thread) ? "threads" :"processes");
|
printf("%d %s:", total, ps.thread ? "threads" : "processes");
|
||||||
ltotal = total;
|
ltotal = total;
|
||||||
|
|
||||||
/* put out enough spaces to get to column 15 */
|
/* put out enough spaces to get to column 15 */
|
||||||
i = digits(total);
|
i = digits(total);
|
||||||
while (i++ < 4)
|
while (i++ < (ps.thread ? 6 : 4))
|
||||||
{
|
{
|
||||||
putchar(' ');
|
putchar(' ');
|
||||||
}
|
}
|
||||||
@ -389,10 +389,10 @@ else {
|
|||||||
/* if number of digits differs, rewrite the label */
|
/* if number of digits differs, rewrite the label */
|
||||||
if (digits(total) != digits(ltotal))
|
if (digits(total) != digits(ltotal))
|
||||||
{
|
{
|
||||||
fputs(" processes:", stdout);
|
printf(" %s:", ps.thread ? "threads" : "processes");
|
||||||
/* put out enough spaces to get to column 15 */
|
/* put out enough spaces to get to column 15 */
|
||||||
i = digits(total);
|
i = digits(total);
|
||||||
while (i++ < 4)
|
while (i++ < (ps.thread ? 6 : 4))
|
||||||
{
|
{
|
||||||
putchar(' ');
|
putchar(' ');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user