Re: [PATCH] printf.3: fix prototype indentation

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

 



Hi Mike,

On 3/5/22 19:10, Mike Frysinger wrote:
> Signed-off-by: Mike Frysinger <vapier@xxxxxxxxxx>
> ---
>  man3/printf.3 | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/man3/printf.3 b/man3/printf.3
> index 4fa1f11f3c25..e39fb069b133 100644
> --- a/man3/printf.3
> +++ b/man3/printf.3
> @@ -47,19 +47,19 @@ vsprintf, vsnprintf \- formatted output conversion
>  .BI "int sprintf(char *restrict " str ,
>  .BI "            const char *restrict " format ", ...);"
>  .BI "int snprintf(char *restrict " str ", size_t " size ,
> -.BI "            const char *restrict " format ", ...);"
> +.BI "             const char *restrict " format ", ...);"
>  .PP
>  .B #include <stdarg.h>
>  .PP
>  .BI "int vprintf(const char *restrict " format ", va_list " ap );
>  .BI "int vfprintf(FILE *restrict " stream ,
> -.BI "            const char *restrict " format ", va_list " ap );
> +.BI "             const char *restrict " format ", va_list " ap );
>  .BI "int vdprintf(int " fd ,
> -.BI "            const char *restrict " format ", va_list " ap );
> +.BI "             const char *restrict " format ", va_list " ap );
>  .BI "int vsprintf(char *restrict " str ,
> -.BI "            const char *restrict " format ", va_list " ap );
> +.BI "             const char *restrict " format ", va_list " ap );
>  .BI "int vsnprintf(char *restrict " str ", size_t " size ,
> -.BI "            const char *restrict " format ", va_list " ap );
> +.BI "              const char *restrict " format ", va_list " ap );
>  .fi
>  .PP
>  .RS -4

Those indents are intentional.  See
<https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/commit/?id=f2667a721278baa6f3dda3a2a42e741ec7ba276b>.

And see man-pages(7):

FORMATTING AND WORDING CONVENTIONS
       [...]

       In the SYNOPSIS, a long function prototype may need to be
       continued  over  to the next line.  The continuation line
       is indented according to the following rules:

       1. [...]

       2. But, where multiple functions in the SYNOPSIS  require
          continuation  lines,  and the function names have dif‐
          ferent lengths, then align all continuation  lines  to
          start  in the same column.  This provides a nicer ren‐
          dering in PDF output  (because  the  SYNOPSIS  uses  a
          variable  width font where spaces render narrower than
          most characters).  As an example:

              int getopt(int argc, char * const argv[],
                         const char *optstring);
              int getopt_long(int argc, char * const argv[],
                         const char *optstring,
                         const struct option *longopts, int *longindex);


Cheers,

Alex


-- 
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/



[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