From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 25 19:53:26 2011 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 0BB76106566C; Fri, 25 Mar 2011 19:53:26 +0000 (UTC) Date: Fri, 25 Mar 2011 19:53:26 +0000 From: Alexander Best To: Warner Losh Message-ID: <20110325195325.GA69264@freebsd.org> References: <20110325002115.GA323@freebsd.org> <20110325015508.GA14565@freebsd.org> <20110325024658.GA19544@freebsd.org> <336A9ACD-29BF-41C9-BC25-917CC1E4587D@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <336A9ACD-29BF-41C9-BC25-917CC1E4587D@bsdimp.com> Cc: freebsd-hackers@FreeBSD.org Subject: Re: Switching to [KMGTPE]i prefixes? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 19:53:26 -0000 On Fri Mar 25 11, Warner Losh wrote: > One difference between this patch, and the patch I came up with, was that I used arrays of character pointers to the names of the symbols to use. This got around the problem that you have with the 'shift' you had to introduce to get things more or less correct. It also made for the possibility of having different kinds of units in the future that weren't a power of 2 -1 bytes long. It also simplified the code a little. > > Perhaps you would consider this improvement when devising future patches. would you mind sharing your patch or pinpoint me to the according thread? cheers. alex > > Warner > > > On Mar 24, 2011, at 8:46 PM, Alexander Best wrote: > > > here is a revised patch. it also includes the necessary changes to the > > humanize_number(3) man page. > > > > cheers. > > alex > > > > -- > > a13x > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" -- a13x