From owner-svn-src-all@FreeBSD.ORG Fri Mar 5 23:08:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86E99106566B; Fri, 5 Mar 2010 23:08:19 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 75F3F8FC23; Fri, 5 Mar 2010 23:08:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o25N8J4s040590; Fri, 5 Mar 2010 23:08:19 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o25N8Jpr040586; Fri, 5 Mar 2010 23:08:19 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201003052308.o25N8Jpr040586@svn.freebsd.org> From: Fabien Thomas Date: Fri, 5 Mar 2010 23:08:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204783 - head/usr.sbin/pmcstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 23:08:19 -0000 Author: fabient Date: Fri Mar 5 23:08:19 2010 New Revision: 204783 URL: http://svn.freebsd.org/changeset/base/204783 Log: Bug fixed: - no display on serial terminal in top mode. - display alignment for continuation string. - correct invalid value used for display limit. MFC after: 3 days Modified: head/usr.sbin/pmcstat/pmcpl_callgraph.c head/usr.sbin/pmcstat/pmcpl_calltree.c head/usr.sbin/pmcstat/pmcstat.c Modified: head/usr.sbin/pmcstat/pmcpl_callgraph.c ============================================================================== --- head/usr.sbin/pmcstat/pmcpl_callgraph.c Fri Mar 5 23:03:20 2010 (r204782) +++ head/usr.sbin/pmcstat/pmcpl_callgraph.c Fri Mar 5 23:08:19 2010 (r204783) @@ -550,7 +550,7 @@ pmcstat_cgnode_topprint(struct pmcstat_c len = ns_len + vs_len + 1; if (width - len < 0) { - PMCSTAT_PRINTW("..."); + PMCSTAT_PRINTW(" ..."); break; } width -= len; Modified: head/usr.sbin/pmcstat/pmcpl_calltree.c ============================================================================== --- head/usr.sbin/pmcstat/pmcpl_calltree.c Fri Mar 5 23:03:20 2010 (r204782) +++ head/usr.sbin/pmcstat/pmcpl_calltree.c Fri Mar 5 23:08:19 2010 (r204783) @@ -387,7 +387,7 @@ pmcpl_ct_node_dumptop(int pmcin, struct if (ct->pct_narc == 0) { pmcpl_ct_topscreen[x+1][*y] = NULL; if (*y >= PMCPL_CT_MAXLINE || - *y >= pmcstat_displaywidth) + *y >= pmcstat_displayheight) return 1; *y = *y + 1; for (i=0; i < x; i++) Modified: head/usr.sbin/pmcstat/pmcstat.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat.c Fri Mar 5 23:03:20 2010 (r204782) +++ head/usr.sbin/pmcstat/pmcstat.c Fri Mar 5 23:08:19 2010 (r204783) @@ -1311,6 +1311,9 @@ main(int argc, char **argv) intrflush(stdscr, FALSE); keypad(stdscr, TRUE); clear(); + /* Get terminal width / height with ncurses. */ + getmaxyx(stdscr, pmcstat_displayheight, pmcstat_displaywidth); + pmcstat_displayheight--; pmcstat_displaywidth--; atexit(pmcstat_topexit); } }