aboutsummaryrefslogtreecommitdiffstats
path: root/man3/printf.3
diff options
context:
space:
mode:
authorUtkarsh Singh <utkarsh190601@gmail.com>2021-03-20 00:57:18 +0100
committerMichael Kerrisk <mtk.manpages@gmail.com>2021-04-04 22:04:29 +0200
commit2fd8db84bf1eb9c0fe5ddc1683dfd252dae611da (patch)
tree4477df49fbcaa726a7b91b708172d243673a900d /man3/printf.3
parent3333af873d4d58b840ea02eac408932d7ed6d8cd (diff)
downloadman-pages-2fd8db84bf1eb9c0fe5ddc1683dfd252dae611da.tar.gz
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>
Diffstat (limited to 'man3/printf.3')
-rw-r--r--man3/printf.38
1 files changed, 8 insertions, 0 deletions
diff --git a/man3/printf.3 b/man3/printf.3
index fc39053c1a..e5da32970d 100644
--- a/man3/printf.3
+++ b/man3/printf.3
@@ -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