Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jun 2018 13:14:04 +0000 (UTC)
From:      Eitan Adler <eadler@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r335601 - head/usr.bin/top
Message-ID:  <201806241314.w5ODE4DX032552@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eadler
Date: Sun Jun 24 13:14:04 2018
New Revision: 335601
URL: https://svnweb.freebsd.org/changeset/base/335601

Log:
  top(1): increase field with width for W/CPU column
  
  This allows 3 digit CPU columns to look nice
  
  Reported by:	feld

Modified:
  head/usr.bin/top/machine.c

Modified: head/usr.bin/top/machine.c
==============================================================================
--- head/usr.bin/top/machine.c	Sun Jun 24 13:08:05 2018	(r335600)
+++ head/usr.bin/top/machine.c	Sun Jun 24 13:14:04 2018	(r335601)
@@ -398,7 +398,7 @@ format_header(const char *uname_field)
 			sbuf_cat(header, "C   ");
 		}
 		sbuf_cat(header, "TIME ");
-		sbuf_printf(header, "%6s ", ps.wcpu ? "WCPU" : "CPU");
+		sbuf_printf(header, " %6s ", ps.wcpu ? "WCPU" : "CPU");
 		sbuf_cat(header, "COMMAND");
 		sbuf_finish(header);
 		break;
@@ -1084,7 +1084,7 @@ format_next_process(struct handle * xhandle, char *(*g
 			}
 			sbuf_printf(procbuf, "%3d ", cpu);
 		}
-		sbuf_printf(procbuf, "%6s", format_time(cputime));
+		sbuf_printf(procbuf, "%6s ", format_time(cputime));
 		sbuf_printf(procbuf, "%6.2f%% ", ps.wcpu ? 100.0 * weighted_cpu(PCTCPU(pp), pp) : 100.0 * PCTCPU(pp));
 	}
 	sbuf_printf(procbuf, "%.*s",



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806241314.w5ODE4DX032552>