From owner-svn-src-head@FreeBSD.ORG Tue Nov 4 21:15:52 2008 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B90B1065672; Tue, 4 Nov 2008 21:15:52 +0000 (UTC) (envelope-from dds@aueb.gr) Received: from mx-out.forthnet.gr (mx-out.forthnet.gr [193.92.150.104]) by mx1.freebsd.org (Postfix) with ESMTP id DA93C8FC16; Tue, 4 Nov 2008 21:15:51 +0000 (UTC) (envelope-from dds@aueb.gr) Received: from mx-av-03.forthnet.gr (mx-av.forthnet.gr [193.92.150.27]) by mx-out-06.forthnet.gr (8.14.3/8.14.3) with ESMTP id mA4KUfSr008959; Tue, 4 Nov 2008 22:30:41 +0200 Received: from MX-IN-04.forthnet.gr (mx-in-04.forthnet.gr [193.92.150.163]) by mx-av-03.forthnet.gr (8.14.3/8.14.3) with ESMTP id mA4KUfNj002971; Tue, 4 Nov 2008 22:30:41 +0200 Received: from [192.168.136.18] (adsl81-74.kln.forthnet.gr [77.49.48.74]) by MX-IN-04.forthnet.gr (8.14.3/8.14.3) with ESMTP id mA4KUW3o015146; Tue, 4 Nov 2008 22:30:34 +0200 Authentication-Results: MX-IN-04.forthnet.gr smtp.mail=dds@aueb.gr; spf=neutral Authentication-Results: MX-IN-04.forthnet.gr header.from=dds@aueb.gr; sender-id=neutral In-Reply-To: <200811041802.mA4I2aVk003708@svn.freebsd.org> References: <200811041802.mA4I2aVk003708@svn.freebsd.org> Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Diomidis Spinellis Date: Tue, 4 Nov 2008 22:30:07 +0200 To: Giorgos Keramidas X-Mailer: Apple Mail (2.753.1) Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r184645 - head/usr.bin/vmstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Nov 2008 21:15:52 -0000 On Nov 4, 2008, at 8:02 PM, Giorgos Keramidas wrote: > Author: keramida (doc committer) > Date: Tue Nov 4 18:02:35 2008 > New Revision: 184645 > URL: http://svn.freebsd.org/changeset/base/184645 > > Log: > Repeat vmstat header after window.rows instead of a hardcoded 20. > > Use ioctl() to get the window size in vmstat(8), and force a new > header to be prepended to the output every time the current window > size changes. Change the number of lines before each header to the > current lines of the terminal when the terminal is resized, so that > the full terminal length can be used for output lines. > > Inspired by: svn change 175562 (same feature for iostat) > Reviewed by: ru (who fixed some of my bugs too) Thanks! This functionality is generally useful and tricky to code in a correct way. Should we perhaps package it in a library function, so that all header-printing commands can benefit from it, without repeating the code? Diomidis Spinellis - dds@