]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
Various pages: Use internally consistent continuation indents in SYNOPSIS
authorMichael Kerrisk <mtk.manpages@gmail.com>
Tue, 5 Jan 2021 18:55:42 +0000 (19:55 +0100)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Tue, 5 Jan 2021 19:27:11 +0000 (20:27 +0100)
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>
16 files changed:
man2/readv.2
man2/rename.2
man2/select.2
man2/sigprocmask.2
man3/envz_add.3
man3/getgrent_r.3
man3/gethostbyname.3
man3/inet_net_pton.3
man3/openpty.3
man3/posix_spawn.3
man3/rcmd.3
man3/regex.3
man3/setnetgrent.3
man3/strerror.3
man3/strtoul.3
man3/wprintf.3

index 2783fd73642d5d4108595adbc44aa29d4183757c..e881a9881a27da776ca763dc4b85ff26c01c823b 100644 (file)
@@ -40,14 +40,14 @@ readv, writev, preadv, pwritev, preadv2, pwritev2 \- read or write data into mul
 .BI "ssize_t writev(int " fd ", const struct iovec *" iov ", int " iovcnt );
 .PP
 .BI "ssize_t preadv(int " fd ", const struct iovec *" iov ", int " iovcnt ,
-.BI "               off_t " offset );
+.BI "                off_t " offset );
 .BI "ssize_t pwritev(int " fd ", const struct iovec *" iov ", int " iovcnt ,
 .BI "                off_t " offset );
 .PP
 .BI "ssize_t preadv2(int " fd ", const struct iovec *" iov ", int " iovcnt ,
 .BI "                off_t " offset ", int " flags );
 .BI "ssize_t pwritev2(int " fd ", const struct iovec *" iov ", int " iovcnt ,
-.BI "                 off_t " offset ", int " flags );
+.BI "                off_t " offset ", int " flags );
 .fi
 .PP
 .RS -4
index 3a5c9b79f6aa2b211f33305ffdbc45378089bc0e..a97115721efa2f4ff403408e938858cc1363921f 100644 (file)
@@ -45,7 +45,7 @@ rename, renameat, renameat2 \- change the name or location of a file
 .BI "int renameat(int " olddirfd ", const char *" oldpath ,
 .BI "             int " newdirfd ", const char *" newpath );
 .BI "int renameat2(int " olddirfd ", const char *" oldpath ,
-.BI "              int " newdirfd ", const char *" newpath \
+.BI "             int " newdirfd ", const char *" newpath \
 ", unsigned int " flags );
 .fi
 .PP
index 68e5a6b59d34f11bcd99371adad46094343ead11..6f5a435fca136e4f26c4c6c72430c05e47aeaa5f 100644 (file)
@@ -54,8 +54,8 @@ synchronous I/O multiplexing
 .BI "void FD_ZERO(fd_set *" set );
 .PP
 .BI "int pselect(int " nfds ", fd_set *" readfds ", fd_set *" writefds ,
-.BI "            fd_set *" exceptfds ", const struct timespec *" timeout ,
-.BI "            const sigset_t *" sigmask );
+.BI "           fd_set *" exceptfds ", const struct timespec *" timeout ,
+.BI "           const sigset_t *" sigmask );
 .fi
 .PP
 .RS -4
index f5cc1dff9c98c8f75f28e77e8860c91bb6d89b0d..5e91046e539a69035b57d1bc17118e04908c87c0 100644 (file)
@@ -38,7 +38,7 @@ sigprocmask, rt_sigprocmask \- examine and change blocked signals
 .PP
 /* Prototype for the underlying system call */
 .BI "int rt_sigprocmask(int " how ", const kernel_sigset_t *" set ,
-.BI "                   kernel_sigset_t *" oldset ", size_t " sigsetsize );
+.BI "                kernel_sigset_t *" oldset ", size_t " sigsetsize );
 .PP
 /* Prototype for the legacy system call (deprecated) */
 .BI "int sigprocmask(int " how ", const old_kernel_sigset_t *" set ,
index 7c554f56d6b8a7bc38bfe353322ce3851fc66bb1..8d783eb55419267d3f37b71698db3f62f99a647c 100644 (file)
@@ -25,7 +25,7 @@ envz_remove, envz_strip \- environment string support
 ", const char *" name );
 .PP
 .BI "error_t envz_merge(char **" envz ", size_t *" envz_len ,
-.BI "                   const char *" envz2 ", size_t " envz2_len \
+.BI "                 const char *" envz2 ", size_t " envz2_len \
 ", int " override );
 .PP
 .BI "void envz_remove(char **" envz ", size_t *" envz_len \
index fc81790095935b231cf6841ed9bcac3e542aeeb5..d7bdc8f47f97dfec89d47cacfe79b23de9f5c155 100644 (file)
@@ -31,7 +31,7 @@ getgrent_r, fgetgrent_r \- get group file entry reentrantly
 .BI "int getgrent_r(struct group *" gbuf ", char *" buf ,
 .BI "               size_t " buflen ", struct group **" gbufp );
 .BI "int fgetgrent_r(FILE *" stream ", struct group *" gbuf ", char *" buf ,
-.BI "                size_t " buflen ", struct group **" gbufp );
+.BI "               size_t " buflen ", struct group **" gbufp );
 .fi
 .PP
 .RS -4
index 8d3755e0de2acdc9e9a093d89d76ddd27ce1b724..5c1a605768cdb34c3ca0793478941eb6ba1a5380 100644 (file)
@@ -65,19 +65,18 @@ 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 "        struct hostent **" result ", int *" h_errnop );
+.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 ,
-.BI "        struct hostent *" ret ", char *" buf ", size_t " buflen ,
-.BI "        struct hostent **" result ", int *" h_errnop );
+.BI "                 struct hostent *" ret ", char *" buf ", size_t " buflen ,
+.BI "                 struct hostent **" result ", int *" h_errnop );
 .BI "int gethostbyname_r(const char *" name ,
-.BI "        struct hostent *" ret ", char *" buf ", size_t " buflen ,
-.BI "        struct hostent **" result ", int *" h_errnop );
+.BI "                 struct hostent *" ret ", char *" buf ", size_t " buflen ,
+.BI "                 struct hostent **" result ", int *" h_errnop );
 .BI "int gethostbyname2_r(const char *" name ", int " af,
-.BI "        struct hostent *" ret ", char *" buf ", size_t " buflen ,
-.BI "        struct hostent **" result ", int *" h_errnop );
+.BI "                 struct hostent *" ret ", char *" buf ", size_t " buflen ,
+.BI "                 struct hostent **" result ", int *" h_errnop );
 .fi
 .PP
 .RS -4
index ce183c805ab6a1000d8c49896206576dc4277a33..94329ff8b707358a79ba97da4e9ed8e3570ed5d6 100644 (file)
@@ -30,7 +30,7 @@ inet_net_pton, inet_net_ntop \- Internet network number conversion
 .B #include <arpa/inet.h>
 .PP
 .BI "int inet_net_pton(int " af ", const char *" pres ,
-.BI "                  void *" netp ", size_t " nsize );
+.BI "                    void *" netp ", size_t " nsize );
 .BI "char *inet_net_ntop(int " af ", const void *" netp ", int " bits ,
 .BI "                    char *" pres ", size_t " psize );
 .fi
index 1732b7e2a39fdacde8a2809c1c99da14fe6447d1..b7bdf2670b70b173e0f48e26b0e88c6f57b74b5a 100644 (file)
@@ -39,8 +39,8 @@ openpty, login_tty, forkpty \- terminal utility functions
 .B #include <pty.h>
 .PP
 .BI "int openpty(int *" amaster ", int *" aslave ", char *" name ,
-.BI "            const struct termios *" termp ,
-.BI "            const struct winsize *" winp );
+.BI "              const struct termios *" termp ,
+.BI "              const struct winsize *" winp );
 .BI "pid_t forkpty(int *" amaster ", char *" name ,
 .BI "              const struct termios *" termp ,
 .BI "              const struct winsize *" winp );
index 2c464e87b636127c8aff300be280c2c1a038c409..cbf6802b15a87bf9e7dff552843eae686db85b40 100644 (file)
@@ -36,9 +36,9 @@ posix_spawn, posix_spawnp \- spawn a process
 .B #include <spawn.h>
 .PP
 .BI "int posix_spawn(pid_t *" pid ", const char *" path ,
-.BI "                const posix_spawn_file_actions_t *" file_actions ,
-.BI "                const posix_spawnattr_t *" attrp ,
-.BI "                char *const " argv[] ", char *const " envp[] );
+.BI "                 const posix_spawn_file_actions_t *" file_actions ,
+.BI "                 const posix_spawnattr_t *" attrp ,
+.BI "                 char *const " argv[] ", char *const " envp[] );
 .BI "int posix_spawnp(pid_t *" pid ", const char *" file ,
 .BI "                 const posix_spawn_file_actions_t *" file_actions ,
 .BI "                 const posix_spawnattr_t *" attrp ,
index e3778fa097501f3c570a89e89246634c3f529f98..b8d7963c9a09dc06538eb4fa0d3d2680d0e58110 100644 (file)
@@ -50,26 +50,26 @@ stream to a remote command
 .B #include <netdb.h> \ \ \fP/* Or <unistd.h> on some systems */
 .PP
 .BI "int rcmd(char **" ahost ", unsigned short " inport ", const char *" locuser ,
-.BI "         const char *" remuser ", const char *" cmd ", int *" fd2p );
+.BI "             const char *" remuser ", const char *" cmd ", int *" fd2p );
 .PP
 .BI "int rresvport(int *" port );
 .PP
 .BI "int iruserok(uint32_t " raddr ", int " superuser ,
 .BI "             const char *" ruser ", const char *" luser );
 .BI "int ruserok(const char *" rhost ", int " superuser ,
-.BI "            const char *" ruser ", const char *" luser );
+.BI "             const char *" ruser ", const char *" luser );
 .PP
 .BI "int rcmd_af(char **" ahost ", unsigned short " inport ", const char *" locuser ,
-.BI "            const char *" remuser ", const char *" cmd ", int *" fd2p ,
-.BI "            sa_family_t " af );
+.BI "             const char *" remuser ", const char *" cmd ", int *" fd2p ,
+.BI "             sa_family_t " af );
 .PP
 .BI "int rresvport_af(int *" port ", sa_family_t " af );
 .PP
 .BI "int iruserok_af(const void *" raddr ", int " superuser ,
-.BI "                const char *" ruser ", const char *" luser \
+.BI "             const char *" ruser ", const char *" luser \
 ", sa_family_t " af );
 .BI "int ruserok_af(const char *" rhost ", int " superuser ,
-.BI "               const char *" ruser ", const char *" luser \
+.BI "             const char *" ruser ", const char *" luser \
 ", sa_family_t " af );
 .fi
 .PP
index d96049eba7aa4c3c52026e9b98e33713f68cb915..c48b88bf5adf55a9d4f3402ccb49bcdba86af8a2 100644 (file)
@@ -40,7 +40,7 @@ regcomp, regexec, regerror, regfree \- POSIX regex functions
 .BI "            regmatch_t " pmatch[] ", int " eflags );
 .PP
 .BI "size_t regerror(int " errcode ", const regex_t *" preg ", char *" errbuf ,
-.BI "                size_t " errbuf_size );
+.BI "            size_t " errbuf_size );
 .BI "void regfree(regex_t *" preg );
 .fi
 .SH DESCRIPTION
index 74f99c44aa3e325f105c036904f9f28a3a9fe7e6..2a91065273101dac1a1b28327c72b0dddef8b732 100644 (file)
@@ -23,7 +23,7 @@ handle network group entries
 .BI "                  char **" domain ", char *" buf ", size_t " buflen );
 .PP
 .BI "int innetgr(const char *" netgroup ", const char *" host ","
-.BI "            const char *" user ", const char *" domain );
+.BI "                  const char *" user ", const char *" domain );
 .fi
 .PP
 .RS -4
index db3c26bdc56fb5d6d613fe035a43d29f10a94414..153c172dcfa2479fbc8ee0ebc03cc69381c6409d 100644 (file)
@@ -48,10 +48,10 @@ strerror, strerrorname_np, strerrordesc_np, strerror_r, strerror_l \- return str
 .BI "const char *strerrordesc_np(int " errnum );
 .PP
 .BI "int strerror_r(int " errnum ", char *" buf ", size_t " buflen );
-            /* XSI-compliant */
+               /* XSI-compliant */
 .PP
 .BI "char *strerror_r(int " errnum ", char *" buf ", size_t " buflen );
-            /* GNU-specific */
+               /* GNU-specific */
 .PP
 .BI "char *strerror_l(int " errnum ", locale_t " locale );
 .fi
index 1774d605a574242cd8edc13ca53e630e146dd90f..f6235f5dd5dc8bd1b90721fcfc0277aab55d1df5 100644 (file)
@@ -40,7 +40,7 @@ strtoul, strtoull, strtouq \- convert a string to an unsigned long integer
 .BI "unsigned long strtoul(const char *" nptr ", char **" endptr \
 ", int " base );
 .BI "unsigned long long strtoull(const char *" nptr ", char **" endptr ,
-.BI "                                int " base );
+.BI "                            int " base );
 .fi
 .PP
 .RS -4
index a55437f060d92eebb60b0abcf334711d8cf08349..06a3ee7044e31f2c6e949e1699379f9b260d86fd 100644 (file)
@@ -30,7 +30,7 @@ wide-character output conversion
 .BI "int vwprintf(const wchar_t *" format ", va_list " args );
 .BI "int vfwprintf(FILE *" stream ", const wchar_t *" format ", va_list " args );
 .BI "int vswprintf(wchar_t *" wcs ", size_t " maxlen ,
-.BI "              const wchar_t *" format ", va_list " args );
+.BI "             const wchar_t *" format ", va_list " args );
 .fi
 .PP
 .RS -4