summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2020-07-06 17:24:59 +0000
committerschwarze <schwarze@openbsd.org>2020-07-06 17:24:59 +0000
commite571446a95083129733d5660e73f71944a5ef2f5 (patch)
treea95c509901aa02ffd04d320ecf4d69d9cade043f /lib/libc
parentin 2014 I added this annotation: /* XXX floating point printf in signal handler */ (diff)
downloadwireguard-openbsd-e571446a95083129733d5660e73f71944a5ef2f5.tar.xz
wireguard-openbsd-e571446a95083129733d5660e73f71944a5ef2f5.zip
Minor tweaks in the description of %g:
1. Clarify that %G uses %F, not %f; noticed by millert@. 2. Mention that %g originally meant "general notation", see: https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/libc/stdio/doprnt.s Triggered by a somewhat different patch from Ian <ropers at gmail dot com>. Feedback and OK millert@ and jmc@.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/stdio/printf.312
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3
index 82e124a1a58..aafb6f5a409 100644
--- a/lib/libc/stdio/printf.3
+++ b/lib/libc/stdio/printf.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: printf.3,v 1.84 2019/08/30 20:27:25 jmc Exp $
+.\" $OpenBSD: printf.3,v 1.85 2020/07/06 17:24:59 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -33,7 +33,7 @@
.\"
.\" @(#)printf.3 8.1 (Berkeley) 6/4/93
.\"
-.Dd $Mdocdate: August 30 2019 $
+.Dd $Mdocdate: July 6 2020 $
.Dt PRINTF 3
.Os
.Sh NAME
@@ -507,11 +507,15 @@ argument is converted in style
.Cm f
or
.Cm e
-(or
+for
+.Cm g ,
+or
+.Cm F
+or
.Cm E
for
.Cm G
-conversions).
+.Pq general floating point notation .
The precision specifies the number of significant digits.
If the precision is missing, 6 digits are given; if the precision is zero,
it is treated as 1.