]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
printf.3: Add overall structure of format string
authorUtkarsh Singh <utkarsh190601@gmail.com>
Fri, 19 Mar 2021 23:57:18 +0000 (00:57 +0100)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Sun, 4 Apr 2021 20:04:29 +0000 (22:04 +0200)
Can we add a small syntax structure for format string in printf(3)
manual.  I personally find if easier to remember and scan.  This has
been taken from OpenBSD printf(3) manual.

Signed-off-by: Utkarsh Singh <utkarsh190601@gmail.com>
[ alx: ffix ]
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man3/printf.3

index fc39053c1ad86d5dad91a7a33a19fc1238e8fdc2..e5da32970d85d8e3159e026c499390fe3b553f35 100644 (file)
@@ -193,6 +193,14 @@ an optional
 and an optional
 .IR "length modifier" .
 .PP
+Overall syntax of format string is:
+.PP
+.in +4n
+.nf
+%[$][flags][width][.precision][length modifier]conversion
+.fi
+.in
+.PP
 The arguments must correspond properly (after type promotion) with the
 conversion specifier.
 By default, the arguments are used in the order