Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/printf Don't describe "%%: in the format as a format...



details:   https://anonhg.NetBSD.org/src/rev/bb5f46d07731
branches:  trunk
changeset: 1021248:bb5f46d07731
user:      kre <kre%NetBSD.org@localhost>
date:      Wed May 19 22:29:18 2021 +0000

description:
Don't describe "%%: in the format as a format conversion, it isn't,
it is an escaped literal '%' character.   None of what applies to
format conversions applies to this.

diffstat:

 usr.bin/printf/printf.1 |  13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diffs (41 lines):

diff -r 59e4491754c9 -r bb5f46d07731 usr.bin/printf/printf.1
--- a/usr.bin/printf/printf.1   Wed May 19 22:20:34 2021 +0000
+++ b/usr.bin/printf/printf.1   Wed May 19 22:29:18 2021 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: printf.1,v 1.35 2020/06/29 22:50:11 uwe Exp $
+.\"    $NetBSD: printf.1,v 1.36 2021/05/19 22:29:18 kre Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\"    from: @(#)printf.1      8.1 (Berkeley) 6/6/93
 .\"
-.Dd August 31, 2018
+.Dd May 19, 2021
 .Dt PRINTF 1
 .Os
 .Sh NAME
@@ -136,6 +136,11 @@
 .Pp
 Each format specification is introduced by the percent character
 .Pq Ql \&% .
+To produce a literal percent
+.Pq Ql \&% 
+in the output, write the percent chracter twice:
+.Pq Ql \&%% .
+This is not a format conversion.
 The remainder of the format specification includes,
 in the following order:
 .Bl -tag -width 5n
@@ -397,10 +402,6 @@
 are printed until the end is reached or until the number of characters
 indicated by the precision specification is reached; if the
 precision is omitted, all characters in the string are printed.
-.It Cm \&%
-Print a literal percent character
-.Pq Ql % ;
-no argument is used.
 .El
 .Pp
 In no case does a non-existent or small field width cause truncation of



Home | Main Index | Thread Index | Old Index