From owner-freebsd-arch@FreeBSD.ORG Fri Sep 17 08:14:19 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F29CB16A4CE for ; Fri, 17 Sep 2004 08:14:18 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id 86BF143D53 for ; Fri, 17 Sep 2004 08:14:18 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id B787EACAE0; Fri, 17 Sep 2004 10:14:16 +0200 (CEST) Date: Fri, 17 Sep 2004 10:14:16 +0200 From: Pawel Jakub Dawidek To: Alexey Dokuchaev Message-ID: <20040917081416.GL30151@darkness.comp.waw.pl> References: <20040916184201.GD30151@darkness.comp.waw.pl> <20040917040445.GA52078@regency.nsu.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gRtU5zt8zDjMv0mc" Content-Disposition: inline In-Reply-To: <20040917040445.GA52078@regency.nsu.ru> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: freebsd-arch@freebsd.org Subject: Re: New libutil function: parse_capacity(3). X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2004 08:14:19 -0000 --gRtU5zt8zDjMv0mc Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 17, 2004 at 11:04:45AM +0700, Alexey Dokuchaev wrote: +> > I implemented parse_capacity() function which can be use to convert a +> > string with a human-readable capacity value to a off_t value. +> >=20 +> > It can be used by utilities like: +> >=20 +> > % truncate -s 8g test +> > # mdconfig -a -t malloc -s 16M +> >=20 +> > Patch can be found here: +> >=20 +> > http://people.freebsd.org/~pjd/patches/parse_capacity.patch +> >=20 +> > Any comments before committing? +>=20 +> Methinks you could probably come up with a better name, since +> "engeneering number mode" (using K, M, T, etc) is used for bandwidth, +> for instance, not just for `capacity'. IMHO. Making it that user can +> easily guess its name from already-there humanize_number(3). Fell free to suggest a better one:) I talked about this name with few people before name was choosen and this is the list of proposals: - dehumanize_number(), - read_humanized_number(), - parse_humanized_humber(), - computerize_number(), - digitalize_number(), - obfuscate_number(), - parse_capacity(), - parse_number(). :) I really don't want to start bikeshed about function name here. --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --gRtU5zt8zDjMv0mc Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBSpzYForvXbEpPzQRAjIyAKCBJL/3Ijji5EF+cnE+JocgHF1XAQCg2Au2 Btgo93906PU22Yh9nMLWp6Q= =55fO -----END PGP SIGNATURE----- --gRtU5zt8zDjMv0mc--