printf.3: Add overall structure of format string

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>
This commit is contained in:
Utkarsh Singh 2021-03-20 00:57:18 +01:00 committed by Michael Kerrisk
parent 3333af873d
commit 2fd8db84bf
1 changed files with 8 additions and 0 deletions

View 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