public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] printf.3: Add overall structure of format string
@ 2021-03-08  8:15 Utkarsh Singh
  2021-03-10 19:42 ` Alejandro Colomar (man-pages)
  0 siblings, 1 reply; 4+ messages in thread
From: Utkarsh Singh @ 2021-03-08  8:15 UTC (permalink / raw)
  To: linux-man, alx.manpages, mtk.manpages

Hi,

Thanks for creating and maintaining Linux man-pages project.

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.

diff --git a/man3/printf.3 b/man3/printf.3
index fa6564426..69ff29316 100644
--- a/man3/printf.3
+++ b/man3/printf.3
@@ -193,6 +193,13 @@ an optional
 and an optional
 .IR "length modifier" .
 .PP
+Overall syntax of format string is:
+.PP
+.in +4n
+.EX
+%[$][flags][width][.precision][length modifier]conversion
+.EE
+.PP
 The arguments must correspond properly (after type promotion) with the
 conversion specifier.
 By default, the arguments are used in the order
-- 
Utkarsh Singh

^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH] printf.3: Add overall structure of format string
@ 2021-03-19 23:57 Alejandro Colomar
  2021-04-04 19:32 ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 4+ messages in thread
From: Alejandro Colomar @ 2021-03-19 23:57 UTC (permalink / raw)
  To: mtk.manpages; +Cc: Utkarsh Singh, linux-man, Alejandro Colomar

From: Utkarsh Singh <utkarsh190601@gmail.com>

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>
---
 man3/printf.3 | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/man3/printf.3 b/man3/printf.3
index fa6564426..7c993074c 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
-- 
2.30.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-04 19:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-08  8:15 [patch] printf.3: Add overall structure of format string Utkarsh Singh
2021-03-10 19:42 ` Alejandro Colomar (man-pages)
  -- strict thread matches above, loose matches on Subject: below --
2021-03-19 23:57 [PATCH] " Alejandro Colomar
2021-04-04 19:32 ` Michael Kerrisk (man-pages)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox