From owner-freebsd-bugs@FreeBSD.ORG Mon Aug 14 09:10:21 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E08B16A4DA for ; Mon, 14 Aug 2006 09:10:21 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A040943D53 for ; Mon, 14 Aug 2006 09:10:20 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k7E9AK2O052378 for ; Mon, 14 Aug 2006 09:10:20 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k7E9AKxC052377; Mon, 14 Aug 2006 09:10:20 GMT (envelope-from gnats) Date: Mon, 14 Aug 2006 09:10:20 GMT Message-Id: <200608140910.k7E9AKxC052377@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Giorgos Keramidas Cc: Subject: Re: bin/101975: [PATCH] Adding percents in /usr/src/usr.bin/systat/pigs.c X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Giorgos Keramidas List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Aug 2006 09:10:21 -0000 The following reply was made to PR bin/101975; it has been noted by GNATS. From: Giorgos Keramidas To: Roberto Lima Cc: freebsd-gnats-submit@freebsd.org Subject: Re: bin/101975: [PATCH] Adding percents in /usr/src/usr.bin/systat/pigs.c Date: Mon, 14 Aug 2006 03:45:22 +0300 On 2006-08-13 16:11, Roberto Lima wrote: > >Description: > I see that systat -pigs don't shows percents in /0 ... /100, so > I make this patch. > > >How-To-Repeat: > # systat -pigs > > /0 /10 /20 /30 /40 /50 /60 /70 /80 /90 /100 > root idle: cpu0 XXXXXXXXXXXXXXX > > >Fix: > --- /usr/src/usr.bin/systat/pigs.c.old Fri Jun 2 10:40:01 2006 > +++ /usr/src/usr.bin/systat/pigs.c Sun Aug 13 13:01:26 2006 > @@ -236,7 +236,7 @@ > wmove(wnd, 0, 0); > wclrtoeol(wnd); > mvwaddstr(wnd, 0, 20, > - "/0 /10 /20 /30 /40 /50 /60 /70 /80 /90 /100"); > + "/0% /10% /20% /30% /40% /50% /60% /70% /80% /90% /100%"); > } > > int > --- Why? Isn't it obvious from the scale that this is a percentage? Moreover, you have just broken the alignment of the "Load Average" scale parts with the percentage stats. You are "wasting space" by using 10 percent signs. Maybe we can make it more obvious that 0/10/20/.../100 is a percentage with a single '%' character as below (which also preserves the current alignment of "Load average" and pigs columns? %%% Index: pigs.c =================================================================== RCS file: /home/ncvs/src/usr.bin/systat/pigs.c,v retrieving revision 1.21 diff -u -r1.21 pigs.c --- pigs.c 30 Apr 2006 04:26:46 -0000 1.21 +++ pigs.c 14 Aug 2006 00:40:06 -0000 @@ -236,7 +236,7 @@ wmove(wnd, 0, 0); wclrtoeol(wnd); mvwaddstr(wnd, 0, 20, - "/0 /10 /20 /30 /40 /50 /60 /70 /80 /90 /100"); + "/0 /10 /20 /30 /40 /50 /60 /70 /80 /90 /100%"); } int %%%