Various pages: Remove explicit blank lines, replacing them with .PP when appropriate

Rationale:
$ man 7 man-pages 2>/dev/null | sed -n /Paragraphs/,/^$/p
       Paragraphs should be separated by suitable markers (usually
       either .PP or .IP).  Do not separate paragraphs using blank
       lines,  as  this  results  in poor rendering in some output
       formats (such as PostScript and PDF).

Fix:
$ sed -i -e '1,/^\.EX/s/^$/.PP/' -e '/^\.EE/,/^\.EX/s/^$/.PP/' man?/*

And then some manual adjustments.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Alejandro Colomar 2020-12-22 20:17:46 +01:00 committed by Michael Kerrisk
parent 4fce5f5bc8
commit eaa18d3c44
47 changed files with 46 additions and 50 deletions

View File

@ -33,7 +33,7 @@ _exit, _Exit \- terminate the calling process
.B #include <unistd.h>
.PP
.BI "void _exit(int " status );
.PP
.B #include <stdlib.h>
.PP
.BI "void _Exit(int " status );

View File

@ -47,7 +47,7 @@ accept, accept4 \- accept a connection on a socket
.B #include <sys/socket.h>
.PP
.BI "int accept(int " sockfd ", struct sockaddr *" addr ", socklen_t *" addrlen );
.PP
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.B #include <sys/socket.h>
.PP

View File

@ -48,14 +48,14 @@ access, faccessat, faccessat2 \- check user's permissions for a file
.B #include <unistd.h>
.PP
.BI "int access(const char *" pathname ", int " mode );
.PP
.BR "#include <fcntl.h> " "/* Definition of AT_* constants */"
.B #include <unistd.h>
.PP
.BI "int faccessat(int " dirfd ", const char *" pathname ", int " \
mode ", int " flags );
/* But see C library/kernel differences, below */
.PP
.BI "int faccessat2(int " dirfd ", const char *" pathname ", int " \
mode ", int " flags );
.fi

View File

@ -29,7 +29,7 @@ bpf \- perform a command on an extended BPF map or program
.SH SYNOPSIS
.nf
.B #include <linux/bpf.h>
.PP
.BI "int bpf(int " cmd ", union bpf_attr *" attr ", unsigned int " size );
.fi
.SH DESCRIPTION

View File

@ -38,7 +38,7 @@ chmod, fchmod, fchmodat \- change permissions of a file
.PP
.BI "int chmod(const char *" pathname ", mode_t " mode );
.BI "int fchmod(int " fd ", mode_t " mode );
.PP
.BR "#include <fcntl.h>" " /* Definition of AT_* constants */"
.B #include <sys/stat.h>
.PP

View File

@ -45,7 +45,7 @@ chown, fchown, lchown, fchownat \- change ownership of a file
.BI "int chown(const char *" pathname ", uid_t " owner ", gid_t " group );
.BI "int fchown(int " fd ", uid_t " owner ", gid_t " group );
.BI "int lchown(const char *" pathname ", uid_t " owner ", gid_t " group );
.PP
.BR "#include <fcntl.h> " "/* Definition of AT_* constants */"
.B #include <unistd.h>
.PP

View File

@ -43,7 +43,7 @@ dup, dup2, dup3 \- duplicate a file descriptor
.PP
.BI "int dup(int " oldfd );
.BI "int dup2(int " oldfd ", int " newfd );
.PP
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.BR "#include <fcntl.h>" " /* Obtain O_* constant definitions */"
.B #include <unistd.h>

View File

@ -38,7 +38,7 @@ getgroups, setgroups \- get/set list of supplementary group IDs
.B #include <unistd.h>
.PP
.BI "int getgroups(int " size ", gid_t " list []);
.PP
.B #include <grp.h>
.PP
.BI "int setgroups(size_t " size ", const gid_t *" list );

View File

@ -34,7 +34,7 @@ keyctl \- manipulate the kernel's key management facility
.B #include <keyutils.h>
.PP
.BI "long keyctl(int " operation ", ...);"
.PP
.B "/* For direct call via syscall(2): */"
.B #include <asm/unistd.h>
.B #include <linux/keyctl.h>

View File

@ -18,7 +18,7 @@ mkdir, mkdirat \- create a directory
.\" .B #include <unistd.h>
.PP
.BI "int mkdir(const char *" pathname ", mode_t " mode );
.PP
.BR "#include <fcntl.h> " "/* Definition of AT_* constants */"
.B #include <sys/stat.h>
.PP

View File

@ -23,7 +23,7 @@ mknod, mknodat \- create a special or ordinary file
.B #include <unistd.h>
.PP
.BI "int mknod(const char *" pathname ", mode_t " mode ", dev_t " dev );
.PP
.BR "#include <fcntl.h> " "/* Definition of AT_* constants */"
.B #include <sys/stat.h>
.PP

View File

@ -38,7 +38,7 @@ mprotect, pkey_mprotect \- set protection on a region of memory
.B #include <sys/mman.h>
.PP
.BI "int mprotect(void *" addr ", size_t " len ", int " prot );
.PP
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.B #include <sys/mman.h>
.PP

View File

@ -48,7 +48,7 @@ pipe, pipe2 \- create pipe
.PP
/* On all other architectures */
.BI "int pipe(int " pipefd "[2]);"
.PP
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.BR "#include <fcntl.h>" " /* Obtain O_* constant definitions */"
.B #include <unistd.h>

View File

@ -35,7 +35,7 @@ poll, ppoll \- wait for some event on a file descriptor
.B #include <poll.h>
.PP
.BI "int poll(struct pollfd *" fds ", nfds_t " nfds ", int " timeout );
.PP
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.B #include <signal.h>
.B #include <poll.h>

View File

@ -50,7 +50,7 @@ readlink, readlinkat \- read value of a symbolic link
.PP
.BI "ssize_t readlink(const char *" pathname ", char *" buf \
", size_t " bufsiz );
.PP
.BR "#include <fcntl.h> " "/* Definition of AT_* constants */"
.B #include <unistd.h>
.PP

View File

@ -37,7 +37,7 @@ reboot \- reboot or enable/disable Ctrl-Alt-Del
.B #include <linux/reboot.h>
.PP
.BI "int reboot(int " magic ", int " magic2 ", int " cmd ", void *" arg );
.PP
/* Under glibc and most alternative libc's (including uclibc, dietlibc,
musl and a few others), some of the constants involved have gotten
symbolic names RB_*, and the library call is a 1-argument

View File

@ -38,7 +38,7 @@ rename, renameat, renameat2 \- change the name or location of a file
.B #include <stdio.h>
.PP
.BI "int rename(const char *" oldpath ", const char *" newpath );
.PP
.BR "#include <fcntl.h> " "/* Definition of AT_* constants */"
.B #include <stdio.h>
.PP

View File

@ -12,7 +12,7 @@ get_thread_area, set_thread_area \- manipulate thread-local storage information
.SH SYNOPSIS
.nf
.B #include <linux/unistd.h>
.PP
.B #if defined __i386__ || defined __x86_64__
.B # include <asm/ldt.h>
.PP

View File

@ -48,7 +48,7 @@ stat, fstat, lstat, fstatat \- get file status
.BI "int stat(const char *" pathname ", struct stat *" statbuf );
.BI "int fstat(int " fd ", struct stat *" statbuf );
.BI "int lstat(const char *" pathname ", struct stat *" statbuf );
.PP
.BR "#include <fcntl.h> " "/* Definition of AT_* constants */"
.B #include <sys/stat.h>
.PP

View File

@ -38,7 +38,7 @@ symlink, symlinkat \- make a new name for a file
.B #include <unistd.h>
.PP
.BI "int symlink(const char *" target ", const char *" linkpath );
.PP
.BR "#include <fcntl.h> " "/* Definition of AT_* constants */"
.B #include <unistd.h>
.PP

View File

@ -38,7 +38,7 @@ unlink, unlinkat \- delete a name and possibly the file it refers to
.B #include <unistd.h>
.PP
.BI "int unlink(const char *" pathname );
.PP
.BR "#include <fcntl.h> " "/* Definition of AT_* constants */"
.B #include <unistd.h>
.PP

View File

@ -41,7 +41,7 @@ abs, labs, llabs, imaxabs \- compute the absolute value of an integer
.BI "int abs(int " j );
.BI "long labs(long " j );
.BI "long long llabs(long long " j );
.PP
.B #include <inttypes.h>
.PP
.BI "intmax_t imaxabs(intmax_t " j );

View File

@ -42,7 +42,7 @@ crypt, crypt_r \- password and data encryption
.B #include <unistd.h>
.PP
.BI "char *crypt(const char *" key ", const char *" salt );
.PP
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.B #include <crypt.h>
.PP

View File

@ -36,12 +36,12 @@ encrypt, setkey, encrypt_r, setkey_r \- encrypt 64-bit messages
.B #include <unistd.h>
.PP
.BI "void encrypt(char " block "[64], int " edflag );
.PP
.BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */"
.B #include <stdlib.h>
.PP
.BI "void setkey(const char *" key );
.PP
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.B "#include <crypt.h>"
.PP

View File

@ -50,7 +50,7 @@ err, verr, errx, verrx, warn, vwarn, warnx, vwarnx \- formatted error messages
.BI "void warn(const char *" fmt ", ...);"
.PP
.BI "void warnx(const char *" fmt ", ...);"
.PP
.B #include <stdarg.h>
.PP
.BI "void verr(int " eval ", const char *" fmt ", va_list " args );

View File

@ -31,7 +31,7 @@ fpurge, __fpurge \- purge a stream
.B #include <stdio.h>
.PP
.BI "int fpurge(FILE *" stream );
.PP
/* supported */
.B #include <stdio.h>
.B #include <stdio_ext.h>

View File

@ -49,7 +49,7 @@ gethostent_r \- get network host entry
.B extern int h_errno;
.PP
.BI "struct hostent *gethostbyname(const char *" name );
.PP
.BR "#include <sys/socket.h>" " /* for AF_INET */"
.BI "struct hostent *gethostbyaddr(const void *" addr ,
.BI " socklen_t " len ", int " type );

View File

@ -47,7 +47,7 @@ getmntent_r \- get filesystem descriptor file entry
.BI "int endmntent(FILE *" streamp );
.PP
.BI "char *hasmntopt(const struct mntent *" mnt ", const char *" opt );
.PP
/* GNU extension */
.B #include <mntent.h>
.PP

View File

@ -32,7 +32,7 @@ lckpwdf, ulckpwdf \- get shadow password file entry
.B int lckpwdf(void);
.PP
.B int ulckpwdf(void);
.PP
/* GNU extension */
.B #include <shadow.h>
.PP

View File

@ -273,7 +273,7 @@ Glibc adds reentrant versions
.PP
.nf
.B #include <utmp.h>
.PP
.BI "int getutent_r(struct utmp *" ubuf ", struct utmp **" ubufp );
.BI "int getutid_r(struct utmp *" ut ,
.BI " struct utmp *" ubuf ", struct utmp **" ubufp );

View File

@ -31,7 +31,7 @@ inet_net_pton, inet_net_ntop \- Internet network number conversion
.PP
.BI "int inet_net_pton(int " af ", const char *" pres ,
.BI " void *" netp ", size_t " nsize );
.PP
.BI "char *inet_net_ntop(int " af ", const void *" netp ", int " bits ,
.BI " char *" pres ", size_t " psize );
.fi

View File

@ -16,7 +16,7 @@ mempcpy, wmempcpy \- copy memory area
.B #include <string.h>
.PP
.BI "void *mempcpy(void *" dest ", const void *" src ", size_t " n );
.PP
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.B #include <wchar.h>
.PP

View File

@ -34,7 +34,7 @@ mkfifo, mkfifoat \- make a FIFO special file (a named pipe)
.B #include <sys/stat.h>
.PP
.BI "int mkfifo(const char *" pathname ", mode_t " mode );
.PP
.BR "#include <fcntl.h> " "/* Definition of AT_* constants */"
.B #include <sys/stat.h>
.PP

View File

@ -14,7 +14,7 @@ open_memstream, open_wmemstream \- open a dynamic memory buffer stream
.B #include <stdio.h>
.PP
.BI "FILE *open_memstream(char **" ptr ", size_t *" sizeloc );
.PP
.B #include <wchar.h>
.PP
.BI "FILE *open_wmemstream(wchar_t **" ptr ", size_t *" sizeloc );

View File

@ -45,7 +45,7 @@ openpty, login_tty, forkpty \- terminal utility functions
.BI "pid_t forkpty(int *" amaster ", char *" name ,
.BI " const struct termios *" termp ,
.BI " const struct winsize *" winp );
.PP
.B #include <utmp.h>
.PP
.BI "int login_tty(int " fd );

View File

@ -35,7 +35,7 @@ perror \- print a system error message
.B #include <stdio.h>
.PP
.BI "void perror(const char *" s );
.PP
.B #include <errno.h>
.PP
.BI "const char * const " sys_errlist [];

View File

@ -36,7 +36,7 @@ posix_memalign, aligned_alloc, memalign, valloc, pvalloc \- allocate aligned mem
.BI "int posix_memalign(void **" memptr ", size_t " alignment ", size_t " size );
.BI "void *aligned_alloc(size_t " alignment ", size_t " size );
.BI "void *valloc(size_t " size );
.PP
.B #include <malloc.h>
.PP
.BI "void *memalign(size_t " alignment ", size_t " size );

View File

@ -44,7 +44,7 @@ vsprintf, vsnprintf \- formatted output conversion
.BI "int dprintf(int " fd ", const char *" format ", ...);"
.BI "int sprintf(char *" str ", const char *" format ", ...);"
.BI "int snprintf(char *" str ", size_t " size ", const char *" format ", ...);"
.PP
.B #include <stdarg.h>
.PP
.BI "int vprintf(const char *" format ", va_list " ap );

View File

@ -26,7 +26,7 @@ Finally, the procedure call returns to the client.
.PP
To take use of these routines, include the header file
.IR "<rpc/rpc.h>" .
.PP
The prototypes below make use of the following types:
.PP
.RS 4

View File

@ -76,7 +76,7 @@ a directory for matching entries
.BI "int alphasort(const struct dirent **" a ", const struct dirent **" b );
.PP
.BI "int versionsort(const struct dirent **" a ", const struct dirent **" b );
.PP
.BR "#include <fcntl.h>" " /* Definition of AT_* constants */"
.B #include <dirent.h>
.PP

View File

@ -59,7 +59,7 @@ scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf \- input format conversion
.BI "int scanf(const char *" format ", ...);"
.BI "int fscanf(FILE *" stream ", const char *" format ", ...);"
.BI "int sscanf(const char *" str ", const char *" format ", ...);"
.PP
.B #include <stdarg.h>
.PP
.BI "int vscanf(const char *" format ", va_list " ap );

View File

@ -40,7 +40,7 @@ strchr, strrchr, strchrnul \- locate character in string
.BI "char *strchr(const char *" s ", int " c );
.PP
.BI "char *strrchr(const char *" s ", int " c );
.PP
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.B #include <string.h>
.PP

View File

@ -1,4 +1,3 @@
.\" and Copyright (C) 2014 Michael Kerrisk <mtk.manpages@gmail.com>
.\"
.\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)

View File

@ -49,7 +49,7 @@ putchar_unlocked \- nonlocking stdio functions
.PP
.BI "char *fgets_unlocked(char *" s ", int " n ", FILE *" stream );
.BI "int fputs_unlocked(const char *" s ", FILE *" stream );
.PP
.B #include <wchar.h>
.PP
.BI "wint_t getwc_unlocked(FILE *" stream );

View File

@ -568,7 +568,6 @@ Since Linux 5.0, the
kernel boot option (described below) can be used to disable cgroup v1
named hierarchies, by specifying
.IR cgroup_no_v1=named .
.\"
.SH CGROUPS VERSION 2
In cgroups v2,

View File

@ -127,8 +127,7 @@ user categories), and can't be changed.
However, magic links do not follow this rule.
They can have a non-0777 mode,
though this mode is not currently used in any permission checks.
.\"
.\" .PP
.\" The
.\" 4.4BSD
.\" system differs from historical

View File

@ -326,7 +326,6 @@ and
.I /proc/[pid]/ns/time_for_children
symbolic links, we see that the shell is a member of the initial time
namespace, but its children are created in the new namespace.
.PP
.in +4n
.EX