Commit Graph

22062 Commits

Author SHA1 Message Date
Alejandro Colomar aa0da2b9b1 Various pages: tfix: Use Oxford comma
Found using:
$ pcregrep -rnM "^\.[B|I]R .*,\n\.[B|I].*[^,]\nor" man? \
  |grep ^man \
  |sort;

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-08 09:57:24 +01:00
Alejandro Colomar 03659d7d46 close.2, getpriority.2, ioctl_userfaultfd.2, expm1.3, lio_listio.3, rcmd.3, lirc.4, mount_namespaces.7: tfix: Fix punctuation
Found using:
$ pcregrep -rnM '^..[^"].*[^.]\.\n[a-z]' man?

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-08 09:55:25 +01:00
Yang Xu 43ebbd1925 semctl.2: Correct SEM_STAT_ANY description
Since kernel commit a280d6dc77eb
("ipc/sem: introduce semctl(SEM_STAT_ANY)"),
it only skips read access check when using SEM_STAT_ANY command.
And it should use the semid_ds struct instead of seminfo struct.
Fix this.

Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
Acked-by: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-07 14:29:14 +01:00
Michael Kerrisk 8c7307e8c6 rcmd.3: wfix (errno)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-07 14:29:14 +01:00
Michael Kerrisk e46baa4443 wait.2: Minor wording fixes in RETURN VALUE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-07 14:29:14 +01:00
Michael Kerrisk a8a93e8a5a sched_setaffinity.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-07 14:29:14 +01:00
Michael Kerrisk 2ae5c63aed epoll_wait.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-07 14:29:14 +01:00
Michael Kerrisk a084d8168c cacheflush.2: wfix (errno)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-07 14:29:14 +01:00
Michael Kerrisk 89fc988bd5 adjtimex.2: wfix (errno)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-07 14:29:14 +01:00
Michael Kerrisk 7a6227d368 Various pages: Various improvements in wording in RETURN VALUE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-07 14:29:00 +01:00
Michael Kerrisk 9862ec0c5c Various System V IPC pages: Improve wording describing RETURN VALUE and setting of 'errno'
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-07 14:28:40 +01:00
Michael Kerrisk cb6a894ee7 Various pages: Standardize wording around setting of 'errno' on error
In the RETURN VALUE sections, a number of different wordings
are used in to describe the fact that 'errno' is set on error.
There's no reason for the difference in wordings, since the same
thing is being described in each case. Switch to a standard
wording that is the same as FreeBSD and similar to the wording
used in POSIX.1.

In this change, miscellaneous descriptions of the setting
of 'errno' are reworded to the norm of "is set to indicate
the error".

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-07 14:27:51 +01:00
Michael Kerrisk c112329ffe Various pages: Standardize wording around setting of 'errno' on error
In the RETURN VALUE sections, a number of different wordings
are used in to describe the fact that 'errno' is set on error.
There's no reason for the difference in wordings, since the same
thing is being described in each case. Switch to a standard
wording that is the same as FreeBSD and similar to the wording
used in POSIX.1.

In this change, reword various cases saying that 'errno' is set
"appropriately" to "is set to indicate the error".

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-07 14:27:51 +01:00
Michael Kerrisk f6a4078be5 Various pages: Standardize wording around setting of 'errno' on error
In the RETURN VALUE sections, a number of different wordings
are used in to describe the fact that 'errno' is set on error.
There's no reason for the difference in wordings, since the same
thing is being described in each case. Switch to a standard
wording that is the same as FreeBSD and similar to the wording
used in POSIX.1.

In this change, fix some instances stating that 'errno' is set
"appropriately" to instead say "to indicate the error".

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-07 14:27:35 +01:00
Michael Kerrisk 855d489a7f Various pages: Standardize wording around setting of 'errno' on error
In the RETURN VALUE sections, a number of different wordings
are used in to describe the fact that 'errno' is set on error.
There's no reason for the difference in wordings, since the same
thing is being described in each case. Switch to a standard
wording that is the same as FreeBSD and similar to the wording
used in POSIX.1.

In this change, "to indicate the cause of the error"
is changed to "to indicate the error".

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-07 14:27:27 +01:00
Michael Kerrisk 3cf2958737 wordexp.3: Minor wording fixes in RETURN VALUE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-07 14:27:02 +01:00
Michael Kerrisk 30b0d8d97e memusage.1: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-07 14:27:02 +01:00
Michael Kerrisk a077147b0a chroot.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-07 14:27:02 +01:00
Michael Kerrisk 2aec4ef8f5 ioctl_tty.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-07 14:27:02 +01:00
Michael Kerrisk 2858b5b5ef ioctl_tty.2: Reformat argument type information
The current mark-up renders poorly. To resolve this, move
the type information into a separate line.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-07 00:05:48 +01:00
Michael Kerrisk 6d1a711b69 netlink.7: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-07 00:05:48 +01:00
Michael Kerrisk 0b174fe008 clone.2, ioctl_tty.2, syslog.2, setlocale.3, stdio.3, console_codes.4, inode.7, namespaces.7, netlink.7, signal-safety.7, socket.7: Better table formatting
In particular, allow for rendering in widths different from
(especially less than) 80 columns.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-07 00:05:48 +01:00
Michael Kerrisk 30e3e116bb syscalls.2: ffix: Improve table formatting
Allow more text wrapping in the Notes column

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-06 15:28:02 +01:00
Michael Kerrisk 0ab815e900 man-pages.7: ffix: don't fill text in tables
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-06 15:06:06 +01:00
Michael Kerrisk 29b18c3946 slist.3: tfix
Reported-by: Alejandro Colomar (man-pages) <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-06 13:53:34 +01:00
Michael Kerrisk 9d281e06da Various pages: add missing .nf/.fi in FTM info
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-06 13:46:44 +01:00
Michael Kerrisk 422d5327a8 rcmd.3: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-06 13:46:44 +01:00
Michael Kerrisk 5c10d2c5e2 Various pages: Remove redundant escaping of space characters in FTM info
Since we are using .nf/.fi to bracket FTM info, escaping
space characters serves no space and clutters the source.

Reported-by: Alejandro Colomar (man-pages) <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-06 13:46:44 +01:00
Michael Kerrisk 2bafc702d0 fsync.2: srcfix: add missing ./f/.fi in FTMs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-06 13:46:44 +01:00
Michael Kerrisk 5979710fc5 wait4.2: ffix (Make FTM text narrower)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-06 13:46:44 +01:00
Alejandro Colomar 554afbe862 circleq.3, list.3, slist.3, stailq.3, tailq.3: Improve readability, especially in SYNOPSIS
- Group macros by kinds.
- Align so that it's easiest to distinguish differences
  between related macros.
  (Align all continuations for consistency on PDF.)
- Fix minor typos.
- Remove redundant text:
    'The macro xxx() ...':
        The first paragraph already says that these are macros.
    'circular|tail|... queue':
        Don't need to repeat every time.
        Generic text makes it easier to spot the differences.
- Fit lines into 78 columns.
- Reorder descriptions to match SYNOPSIS,
  and add subsections to DESCRIPTION.
- srcfix: fix a few semantic newlines.

I noticed a bug which should be fixed next:
CIRCLEQ_LOOP_*() return a 'struct TYPE *'.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-06 13:46:44 +01:00
John Morris 076fbe0613 resolv.conf.5: tfix
Change `RES_USE_EDNSO` to `RES_USE_EDNS0`, defined in
`resolv.h`.  (This is written correctly in `man3/resolver.3` in this
same repo.)  Helps with grepping and internet searches!

Signed-off-by: John Morris <john@zultron.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-06 13:46:44 +01:00
Michael Kerrisk b32feea59e Various pages: Formatting tweaks after "Improve formatting in ATTRIBUTES"
Various ATTRIBUTES table improvements following the previous
commit. In particular, make use of T{...T} to allow wrapping
in table cells that have a lot of text.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-06 13:46:44 +01:00
Michael Kerrisk c466875ecd Various pages: Improve formatting in ATTRIBUTES
Make the formatting more consistent inside the tables in the
ATTRIBUTES sections. Make the source code more uniform; in
particular, eliminate the use of custom tweaks using
'lbwNN'/'lwNN' and .br macros.  In addition, ensure that
hyphenation and text justification do not occur inside the tables.

This is a script-driven edit:

[[
PAGE_LIST=$(git grep -l 'SH ATTRIBUTES' man[23])

# Strip out any preexisting .sp/.br/.ad macros

sed -i '/SH ATTR/,/^\.SH/{/^\.sp/d; /^\.br/d; /\.ad/d}' $PAGE_LIST

# Eliminate any use of 'wNN' in tables; default first column
# to fill unused space

sed -i '/SH ATTR/,/^\.SH/s/lbw[0-9]*/lb/g' $PAGE_LIST
sed -i '/SH ATTR/,/^\.SH/s/lw[0-9]*/l/g' $PAGE_LIST
sed -i '/SH ATTR/,/^\.SH/s/^lb /lbx /' $PAGE_LIST

# Nest the tables inside ".ad l"+".nh" and ".hy"+".ad"+".sp 1"
# ".ad l" ==> no right justification of text in table cells
# ".nh" ==> No hyphenation in table cells
# ".sp 1" ==> ensure a blank line before the next section heading

sed -i '/SH ATTR/,/^\.SH/{/\.TS/i.ad l\n.nh
}'  $PAGE_LIST
sed -i '/SH ATTR/,/^\.SH/{/\.TE/a.hy\n.ad\n.sp 1
}'  $PAGE_LIST

# In a few of the tables, the third column has a lot of text, so
# make that column wide (rather than the first column)

sed -i '/^lbx/{s/lbx/lb/;s/lb$/lbx/}' \
        man3/bindresvport.3 \
        man3/fmtmsg.3 man3/gethostbyname.3 man3/getlogin.3 \
        man3/getnetent.3 man3/getprotoent.3 man3/getpwent.3 \
        man3/getservent.3 man3/getspnam.3 man3/getutent.3 man3/glob.3 \
        man3/login.3 \
        man3/setnetgrent.3 \
        man3/wordexp.3
]]

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-06 13:46:39 +01:00
Michael Kerrisk daaf6d327b getlogin.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-06 10:32:26 +01:00
Michael Kerrisk 365a3f2919 man-pages.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-06 10:20:50 +01:00
Michael Kerrisk f2667a7212 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>
2021-01-05 20:27:11 +01:00
Michael Kerrisk 96b6532808 stat.2: Move the obsolete _BSD_SOURCE FTM to the end of the FTM info
Since _BSD_SOURCE is obsolete for quite some time now,
it should not be listed as the first FTM for lstat().

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-05 14:35:55 +01:00
Michael Kerrisk 1dd0d7b4e4 Various pages: ffix: More layout consistency fixes for FTMs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-05 13:22:01 +01:00
Alejandro Colomar ba2c475246 futex.2, syscalls.2, vmsplice.2, bpf-helpers.7: wfix: Write consistently 'user space' instead of 'userspace'
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-05 12:48:33 +01:00
Michael Kerrisk 72af9e8351 fseeko.3: Move info about obsolete FTM from SYNOPSIS to NOTES
This makes the SYNOPSIS more consistent with other pages.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-05 11:01:22 +01:00
Michael Kerrisk cc4423f732 j0.3, strerror.3, y0.3: wspfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-05 11:01:22 +01:00
Michael Kerrisk 58a6844d20 brk.2, chmod.2, gethostname.2, setpgid.2, wait4.2, atoi.3, fwide.3, getlogin.3, printf.3, strtoul.3, wprintf.3: Consistency fix-up in FTMs
Generally, place '||' at start of a line, rather than the end of
the previous line.

Rationale: this placement clearly indicates that that each piece
is an alternative.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-05 11:01:22 +01:00
Michael Kerrisk 16fe373c85 qecvt.3: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-05 11:01:22 +01:00
Michael Kerrisk b15b92a585 fsync.2, gethostname.2, stat.2, getutent.3: Minor consistency clean-ups in FTMs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-05 11:01:22 +01:00
Michael Kerrisk 9d2adbae20 Various pages: Simplify mark-up for Feature Test Macro requirements
Different source styles are used in different pages to achieve the
same formatted output, and in some cases the source mark-up is a
rather convoluted combination of .RS/.RE/.TP/.PD macros. Simplify
this greatly, and unify all of the pages to use more or less the
same source code style. This makes the source code rather easier
to read, and may simplify future scripted global changes.

The feature test macro info is currently bracketed by .nf/.fi
pairs. This is not strictly necessary (i.e., it makes no
difference to the rendered output), but for the moment we keep
these "brackets" in case they may be replaced with something else.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-05 11:01:01 +01:00
Michael Kerrisk 1a412fc5cb gethostid.3: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-04 16:27:45 +01:00
Michael Kerrisk e36f10f91d Various pages: replace '.ad b' macro with '.ad'
Verified no change in rendered output

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-04 16:25:50 +01:00
Michael Kerrisk 3d614fb849 clock_getres.2, atan2.3, ctime.3, getcwd.3, isgreater.3, iswblank.3, scalbln.3: ffix
Consistently use 4-space indents for FTMs.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-04 15:55:20 +01:00
Michael Kerrisk 255d42333e chroot.2, rename.2, getgrent.3, nextafter.3, ttyslot.3, wprintf.3: ffix
Bring a bit more consistency to the layout of FTMs.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-01-04 15:47:04 +01:00