Date: Wed, 19 Aug 2009 17:45:59 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r196385 - stable/8/contrib/top Message-ID: <200908191745.n7JHjxKU061005@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Wed Aug 19 17:45:58 2009 New Revision: 196385 URL: http://svn.freebsd.org/changeset/base/196385 Log: 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) Modified: stable/8/contrib/top/ (props changed) stable/8/contrib/top/display.c stable/8/contrib/top/install-sh (props changed) Modified: stable/8/contrib/top/display.c ============================================================================== --- stable/8/contrib/top/display.c Wed Aug 19 16:40:45 2009 (r196384) +++ stable/8/contrib/top/display.c Wed Aug 19 17:45:58 2009 (r196385) @@ -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')
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908191745.n7JHjxKU061005>