Various pages: Use internally consistent continuation indents in SYNOPSIS

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. If there is a single such prototype that needs to be continued,
   then align the continuation line so that when the page is
   rendered on a fixed-width font device (e.g., on an xterm) the
   continuation line starts just below the start of the argument
   list in the line above.  (Exception: the indentation may be
   adjusted if necessary to prevent a very long continuation line
   or a further continuation line where the function prototype is
   very long.)

   Thus:

       int tcsetattr(int fd, int optional_actions,
                     const struct termios *termios_p);

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

   Thus:

       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);

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2021-01-05 19:55:42 +01:00
parent 96b6532808
commit f2667a7212
16 changed files with 34 additions and 35 deletions

View File

@ -65,8 +65,7 @@ gethostent_r \- get network host entry
/* GNU extensions */
.BI "struct hostent *gethostbyname2(const char *" name ", int " af );
.PP
.B "int gethostent_r("
.BI " struct hostent *" ret ", char *" buf ", size_t " buflen ,
.BI "int gethostent_r(struct hostent *" ret ", char *" buf ", size_t " buflen ,
.BI " struct hostent **" result ", int *" h_errnop );
.PP
.BI "int gethostbyaddr_r(const void *" addr ", socklen_t " len ", int " type ,