From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 01 08:41:46 2013 Received: (at submit) by debbugs.gnu.org; 1 Apr 2013 12:41:46 +0000 Received: from localhost ([127.0.0.1]:55659 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UMe3W-0002ib-61 for submit@debbugs.gnu.org; Mon, 01 Apr 2013 08:41:46 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54877) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UMe3T-0002iU-SI for submit@debbugs.gnu.org; Mon, 01 Apr 2013 08:41:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UMe0b-0003u4-Ei for submit@debbugs.gnu.org; Mon, 01 Apr 2013 08:38:51 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-101.9 required=5.0 tests=BAYES_00, USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:46935) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMe0b-0003tz-BQ for submit@debbugs.gnu.org; Mon, 01 Apr 2013 08:38:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37963) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMe0W-0002lA-Ha for bug-coreutils@gnu.org; Mon, 01 Apr 2013 08:38:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UMe0U-0003sn-4S for bug-coreutils@gnu.org; Mon, 01 Apr 2013 08:38:40 -0400 Received: from mail-wi0-x22c.google.com ([2a00:1450:400c:c05::22c]:45069) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMe0T-0003sf-UD for bug-coreutils@gnu.org; Mon, 01 Apr 2013 08:38:38 -0400 Received: by mail-wi0-f172.google.com with SMTP id hr17so1502789wib.17 for ; Mon, 01 Apr 2013 05:38:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=bTzpt0/vJa0pEqZREyLKZqQN+OkhrsVbB858bwZlLkQ=; b=Z8ItiSp7ffTYH2X22q/s4ZGP3f78MY4iCoQyPz4ECcIWnrvIpm6DAAJNi3Yu5dwroG LedbttK5IgeliTmOH0pCgsyqF4uQa7Yvab1pZ4rxHJd3a8N/BHmTmbMKBC2q9DuNFe1U WlN3BW5TswzPFa5QdyLxLS6wrMLqOqPPQE5+lHH7TF/VQZAWxd9YimW9mWwl1t6CIPk4 CiobXy4QXRcP3hbmQZ5y5DVjauVN7OTR3S/ITuBw6PR5bCS7W8QndY/qD6OiFvoMl0si WpFwmbgLloqFZC4sSFkQq71bisyoMp5M8193F1qcIo4YigoOZZnU+GSRd5yZ0E/zx69I hcJQ== X-Received: by 10.194.119.200 with SMTP id kw8mr15377413wjb.31.1364819916502; Mon, 01 Apr 2013 05:38:36 -0700 (PDT) Received: from dutier.st.ewi.tudelft.nl (dutier.st.ewi.tudelft.nl. [130.161.159.51]) by mx.google.com with ESMTPS id k5sm14727115wiy.5.2013.04.01.05.38.34 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 01 Apr 2013 05:38:35 -0700 (PDT) From: =?UTF-8?q?Mihai=20Capot=C4=83?= To: P@draigbrady.com Subject: [PATCH] human: add unambiguous block_size_args Date: Mon, 1 Apr 2013 14:38:25 +0200 Message-Id: <1364819905-28909-1-git-send-email-mihai@mihaic.ro> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <4CAF9EF7.4010209@draigBrady.com> References: <4CAF9EF7.4010209@draigBrady.com> X-Gm-Message-State: ALoCoQkYV3tBDaZ5UHDqAGBQoxV1ZWChfjRpcYYQa7gbRNV5N3IM4+Jsi83nwwipYGoUInlu8PIW X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.2 (------) X-Debbugs-Envelope-To: submit Cc: 7176@debbugs.gnu.org, bug-gnulib@gnu.org, bug-coreutils@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.2 (------) The units used in the outputs of "human-readable" and "si" look identical when "K/k" is not present. Add two block_size_args, "binary" and "decimal", that disambiguate between the outputs of "human-readable" and "si" by adding human_B to the list of options. See bug 7176 in GNU coreutils, . --- lib/human.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/human.c b/lib/human.c index 613dc65..66a1835 100644 --- a/lib/human.c +++ b/lib/human.c @@ -394,11 +394,21 @@ human_readable (uintmax_t n, char *buf, int opts, # define DEFAULT_BLOCK_SIZE 1024 #endif -static char const *const block_size_args[] = { "human-readable", "si", 0 }; +static char const *const block_size_args[] = + { + "human-readable", + "si", + "binary", + "decimal", + 0 + }; + static int const block_size_opts[] = { human_autoscale + human_SI + human_base_1024, - human_autoscale + human_SI + human_autoscale + human_SI, + human_autoscale + human_SI + human_base_1024 + human_B, + human_autoscale + human_SI + human_B }; static uintmax_t -- 1.7.9.5 From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 13 19:56:15 2013 Received: (at control) by debbugs.gnu.org; 13 Apr 2013 23:56:15 +0000 Received: from localhost ([127.0.0.1]:49341 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1URAIo-0000uh-Vx for submit@debbugs.gnu.org; Sat, 13 Apr 2013 19:56:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43437) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1URAIk-0000uM-SP; Sat, 13 Apr 2013 19:56:12 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3DNq6qF004766 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 13 Apr 2013 19:52:06 -0400 Received: from [10.36.116.18] (ovpn-116-18.ams2.redhat.com [10.36.116.18]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3DNq3jl020773 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 13 Apr 2013 19:52:05 -0400 Message-ID: <5169EFA3.60701@draigBrady.com> Date: Sun, 14 Apr 2013 00:52:03 +0100 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: =?UTF-8?B?TWloYWkgQ2Fwb3TEgw==?= Subject: Re: [PATCH] human: add unambiguous block_size_args References: <4CAF9EF7.4010209@draigBrady.com> <1364819905-28909-1-git-send-email-mihai@mihaic.ro> In-Reply-To: <1364819905-28909-1-git-send-email-mihai@mihaic.ro> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id r3DNq6qF004766 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: control Cc: 7176@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) forcemerge 14113 7176 stop On 04/01/2013 01:38 PM, Mihai Capot=C4=83 wrote: > The units used in the outputs of "human-readable" and "si" look > identical when "K/k" is not present. Add two block_size_args, "binary" > and "decimal", that disambiguate between the outputs of "human-readable= " > and "si" by adding human_B to the list of options. >=20 > See bug 7176 in GNU coreutils, > . > --- > lib/human.c | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) >=20 > diff --git a/lib/human.c b/lib/human.c > index 613dc65..66a1835 100644 > --- a/lib/human.c > +++ b/lib/human.c > @@ -394,11 +394,21 @@ human_readable (uintmax_t n, char *buf, int opts, > # define DEFAULT_BLOCK_SIZE 1024 > #endif > =20 > -static char const *const block_size_args[] =3D { "human-readable", "si= ", 0 }; > +static char const *const block_size_args[] =3D > + { > + "human-readable", > + "si", > + "binary", > + "decimal", > + 0 > + }; > + > static int const block_size_opts[] =3D > { > human_autoscale + human_SI + human_base_1024, > - human_autoscale + human_SI > + human_autoscale + human_SI, > + human_autoscale + human_SI + human_base_1024 + human_B, > + human_autoscale + human_SI + human_B > }; So I was 50:50 on making this change, and in the meantime numfmt(1) was r= eleased, which gives full control over number formatting, albeit in a more verbose= /explicit form. thanks, P=C3=A1draig From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 09 16:41:43 2018 Received: (at control) by debbugs.gnu.org; 9 Oct 2018 20:41:43 +0000 Received: from localhost ([127.0.0.1]:42604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9yp4-0004hA-PD for submit@debbugs.gnu.org; Tue, 09 Oct 2018 16:41:42 -0400 Received: from mail-it1-f193.google.com ([209.85.166.193]:55105) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9yp3-0004gu-AC; Tue, 09 Oct 2018 16:41:41 -0400 Received: by mail-it1-f193.google.com with SMTP id l191-v6so4811838ita.4; Tue, 09 Oct 2018 13:41:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=jbss+noxj4+xazTThjnUIJHlycC9avMMogmCOys5bl0=; b=bQzlGVB2naTSaqcLx8DIXrOsG2PdPeNy+9aJ7kARRqFK9pvXE0GaJzbAtI2CGzjXub nIidxpW+UITjoqsUZb1SI25zzYJeMvperRyclS9P96zr+wlPXPRDDQdUuinUtEJO/Qxg UpvHSwOBzUZxCziRkpb3cFbGed+wVuhksPyF4l6MNTL0KlNQXIYR4hlZ8BJXlTR5gdeo lsnKo2AZlDD6rOPYPb5e9+aBaxUq8djBtDWv5H6WFGn4TB/qQrg2Bc8hywKq3cBUR/Yi GCQY96gsjB6Zm338kDiyXvSs2eSv9rKDfxusWgQxo3bTMFMFXUhoLv7IVJBYlBQjisOv ZkSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jbss+noxj4+xazTThjnUIJHlycC9avMMogmCOys5bl0=; b=Ifb+2K/ASKu3v932+IVeoqL9QBZZ7qzOzA/nwut8pg4M7fTVjChEhbzdYjh2cXOT6Z Uhhq77pUJyzsDziDlQSrOwZA/QehMAWT0vFsrLQfC40Zr2VcTSG4JkgsV3D9tfStc2qB wWNIq/haqpiTRTXTGAY3XB9s5NjwDIes/m6gvNSLJSeQA1s6KgkhRr2YEA/nHTIEOWD2 UvhUUKURAv0Qw21edjXJBiQuK0GK9AcNhNIp+1xiYeuzjsye0IEPs67jyVLsy31IXWMN SFHRvsBy7B5RrjdXS6SopufMYQlKTAwXPNlaqf3moCO6wF/BuCMK6UuQKm00O3n76e9G S/KQ== X-Gm-Message-State: ABuFfoirRH0K35NQxl3toal2XkTAf1cDqtkSH0J/V2ceU122nhhONHUf dO/yjDk4gKBARgxqXK+armg46w0aPAo= X-Google-Smtp-Source: ACcGV62JehXxjQYzS4tr3vSsNLRp0FJQqdRskLDdv2NkbCQhta++e4pzOLskaPbmwTVlpwP93/jOng== X-Received: by 2002:a24:c1c5:: with SMTP id e188-v6mr2922599itg.174.1539117695278; Tue, 09 Oct 2018 13:41:35 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id f15-v6sm6574591ita.24.2018.10.09.13.41.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Oct 2018 13:41:34 -0700 (PDT) Subject: Re: bug#7176: [PATCH] human: add unambiguous block_size_args To: =?UTF-8?Q?Mihai_Capot=c4=83?= , =?UTF-8?Q?P=c3=a1draig_Brady?= References: <4CAF9EF7.4010209@draigBrady.com> <1364819905-28909-1-git-send-email-mihai@mihaic.ro> <5169EFA3.60701@draigBrady.com> From: Assaf Gordon Message-ID: <4bf2191d-a97a-fe6f-21c3-cc16865e769f@gmail.com> Date: Tue, 9 Oct 2018 14:41:32 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control Cc: 7176@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 7176 wontfix close 7176 stop (Triaging old bugs) Hello, On 16/04/13 11:12 AM, Mihai Capotă wrote: > On Sun, Apr 14, 2013 at 1:52 AM, Pádraig Brady wrote: >> So I was 50:50 on making this change, and in the meantime numfmt(1) was released, >> which gives full control over number formatting, albeit in a more verbose/explicit form. > > Let me see if I can convince you with a use case. If you set > "BLOCK_SIZE=binary" in your shell configuration file, you get the > output you want from all programs that use gnulib. That's not only > about verbosity, it's something that cannot be easily done with > numfmt. Given that: 1. numfmt does some of the requested functionality 2. environment variables are frowned upon and not likely to be expanded 3. there has been no further comments in 5 and a half years I'm opting to close this bug, and we can always re-open the bug if needed. Discussion can continue by replying to this thread, regards, - assaf From unknown Sun Aug 17 00:57:29 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 07 Nov 2018 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator