From owner-svn-src-user@FreeBSD.ORG Tue Sep 27 16:57:14 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 886DC1065670; Tue, 27 Sep 2011 16:57:14 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78E958FC13; Tue, 27 Sep 2011 16:57:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p8RGvEpF032407; Tue, 27 Sep 2011 16:57:14 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8RGvEUl032405; Tue, 27 Sep 2011 16:57:14 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201109271657.p8RGvEUl032405@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 27 Sep 2011 16:57:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225802 - user/des/phybs X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2011 16:57:14 -0000 Author: des Date: Tue Sep 27 16:57:14 2011 New Revision: 225802 URL: http://svn.freebsd.org/changeset/base/225802 Log: Lengthen the progress bar to cover the entire width of the numbers which will replace it, change the indicator character from '|' to 'O', and increase the update frequency. Modified: user/des/phybs/phybs.c Modified: user/des/phybs/phybs.c ============================================================================== --- user/des/phybs/phybs.c Tue Sep 27 16:33:17 2011 (r225801) +++ user/des/phybs/phybs.c Tue Sep 27 16:57:14 2011 (r225802) @@ -56,8 +56,8 @@ static int opt_s; static int opt_w; static int tty = 0; -static char progress[] = " [----------------]" - "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"; +static char progress[] = " [-----------------------]" + "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"; static void scan(int fd, size_t size, off_t offset, off_t step, unsigned int count) @@ -94,10 +94,10 @@ scan(int fd, size_t size, off_t offset, errx(EX_IOERR, "short write: %ld < %lu", (long)wlen, (unsigned long)size); } - if (tty && i % 256 == 0) { - progress[2 + (i * 16) / count] = '|'; + if (tty && i % 16 == 0) { + progress[2 + (i * 23) / count] = 'O'; fputs(progress, stdout); - progress[2 + (i * 16) / count] = '-'; + progress[2 + (i * 23) / count] = '-'; fflush(stdout); } }