From nobody Tue Oct 25 21:51:32 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MxlyF0D9Nz4g6Gk; Tue, 25 Oct 2022 21:51:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MxlyD44rjz3gRc; Tue, 25 Oct 2022 21:51:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666734692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cPCrj4iQ4g05QXbY0UW+0oZqmz/77vCgHOLWwpU6+QQ=; b=YRgbksnQlFb1bn3XNP6hrSAROGc0+AIwlaaxS+TVwgpnnGcYS5mywmwV3e/vxuvJ8jdMAy 02qpZ3z4u5booDypyraHKY0MLUWHlY51plrimGGvqM3kkCuvToI1Lb1AfucGmmhpUPc4db EdcV/qrDTz0rZ/apS/m87elnM0NwogTitc2GpYdgCcl9L0WVbPNuTqcvByhdqJ8ZPqVeAh X/sLj9sdVNQmTX0kUaSO977mAD34hylJEj/kY3g/7J6BO9jvwq/teqD97gR4EoyzTvLdbL Cxt3nATqk2ysTUhuro0AckOVbk0r6udPwTtaFlclhaal7diqRkH1pnBWuYMh8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MxlyD35V6ztRK; Tue, 25 Oct 2022 21:51:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29PLpW5f088572; Tue, 25 Oct 2022 21:51:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29PLpWHo088571; Tue, 25 Oct 2022 21:51:32 GMT (envelope-from git) Date: Tue, 25 Oct 2022 21:51:32 GMT Message-Id: <202210252151.29PLpWHo088571@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 7cfd67ce96d9 - main - strfmon(3): Fix # explanation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7cfd67ce96d97c263c2c56c5c437426463467689 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666734692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cPCrj4iQ4g05QXbY0UW+0oZqmz/77vCgHOLWwpU6+QQ=; b=s/SJqZUkSBNpsYy7tgNRhnDwnE8hUcCpxBVIeyUpkGQjf8NkkNVaDedUus2sUwG7X8UFa1 zJ/SK7c+V1hwuffBUMZP6LTk4Q0HJTSRUXh4mAZpEmUOCr35xItaUsckL+JoFPqFdGQCit 6ke5GFfuFSQD5EjiW7cgpRSO7aRO3cw0w2GkNkK9R0Vi+7DoVggi4NTitmOeoTWoDiK67o 8/m0jFDaL0XU6kjMv5lm6DeWjPfSHduvfQqTxGa+x4btEIyY1sB1sDeO8izvDH33KOdRnn ULDHZE94Fsy1QuUe0icxpS632kYvGQ8j0K7HXC9965ryjgE6GFiu405MnIFlaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666734692; a=rsa-sha256; cv=none; b=lU4GS+uSi9or55cL60WXr83J0SBzM9bowSHpuYhD7+ec6of8txOZevWqvoTovnMqZfajsf J5/66nWlqNzZCztB0jNt8CMTY85rWhwHbGkJj6RyE0V2Q2eWm+iBbV6wNzYCxQg5UncZ4p mYFMzszgCv5hjW0t9oMhAuJVVReZnTEb6yEVmj2yO7tCRmiqAOonCmUleSc6qlv2LjH92M gZBbmhlZJBGSG5v3D5vBbe0CJGUR5zQ3Df3m685akFtq465dvG+T/MAdKttP/ZwmzX7lQj bSpshNVmfmT6kybFuGBbqiEKWxFm1cj6y3pEq33Gpel1/AvYbo9RYs85snB3Kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7cfd67ce96d97c263c2c56c5c437426463467689 commit 7cfd67ce96d97c263c2c56c5c437426463467689 Author: Jose Luis Duran AuthorDate: 2022-10-13 16:11:31 +0000 Commit: Konstantin Belousov CommitDate: 2022-10-25 21:48:20 +0000 strfmon(3): Fix # explanation There's only one value that specifies the number of digits after the decimal point (oh, sorry, the "radix character") the other specifies the number before... While here, add a little more info on the effects of using the #n value. Obtained from: https://github.com/NetBSD/src/commit/d1dd1a086400ae719bde1f2c45938d9bc1d29e8b Reviewed by: kib PR: 267282 Github PR: #619 MFC after: 1 week --- lib/libc/stdlib/strfmon.3 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/libc/stdlib/strfmon.3 b/lib/libc/stdlib/strfmon.3 index d6dcf693b80e..27dbbe49071f 100644 --- a/lib/libc/stdlib/strfmon.3 +++ b/lib/libc/stdlib/strfmon.3 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 25, 2012 +.Dd October 26, 2022 .Dt STRFMON 3 .Os .Sh NAME @@ -98,7 +98,13 @@ By default, there is no minimum width. A .Sq Cm # sign followed by a decimal number specifying the maximum -expected number of digits after the radix character. +expected number of digits before the radix character. +When this option is used, values that do not exceed the +specified number of digits are formatted so they will be +correctly aligned with other values printed using the same +format. +This includes always leaving space for a possible sign +indicator, even if none is needed for a particular value. .It A .Sq Cm \&.