git: 7cfd67ce96d9 - main - strfmon(3): Fix # explanation
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 25 Oct 2022 21:51:32 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=7cfd67ce96d97c263c2c56c5c437426463467689
commit 7cfd67ce96d97c263c2c56c5c437426463467689
Author: Jose Luis Duran <jlduran@gmail.com>
AuthorDate: 2022-10-13 16:11:31 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
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 \&.