Re: [PATCH] printf.3: Add overall structure of format string

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

 



Hi Alex,

On 3/20/21 12:57 AM, Alejandro Colomar wrote:
> From: Utkarsh Singh <utkarsh190601@xxxxxxxxx>
> 
> 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.

Patch applied.

Thanks,

Michael

> Signed-off-by: Utkarsh Singh <utkarsh190601@xxxxxxxxx>
> [ alx: ffix ]
> Signed-off-by: Alejandro Colomar <alx.manpages@xxxxxxxxx>
> ---
>  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
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux