aboutsummaryrefslogtreecommitdiffstats
path: root/man3/regex.3
diff options
context:
space:
mode:
authorG. Branden Robinson <g.branden.robinson@gmail.com>2023-07-19 21:06:12 -0500
committerAlejandro Colomar <alx@kernel.org>2023-07-20 15:27:21 +0200
commit9e54434eade8afb70ed271b23643d020c1cb3402 (patch)
treeb71900fc5a3fa130cdb0e9530015c880e6baa992 /man3/regex.3
parent18a466700a3e7cd5ac8c3899c476676a0cd616c0 (diff)
downloadman-pages-9e54434eade8afb70ed271b23643d020c1cb3402.tar.gz
man*/: ffix (un-bracket tables)
* Stop disabling adjustment and automatic hyphenation before tables, and incorrectly "restoring" it afterward. In addition to repetitious boilerplate around tables, the `ad` and `hy` requests, when not given arguments, do not behave as many man page authors expect. If adjustment was initially disabled when rendering the page, it was being activated after `TE` calls, frustrating the desire of the reader. Furthermore, `hy` when given no argument enables automatic hyphenation in mode "1", which is not an appropriate value for the TeX-based hyphenation patterns for English that groff has used for over 30 years. And analogously to `ad`, a simple `hy` request would reactivate automatic hyphenation even if the reader had disabled it. Moreover, such fiddling is often unnecessary. tbl(1) from groff 1.23.0 describes how tbl(1) has always worked, dating back to Michael Lesk's original implementation at Bell Labs in the 1970s. "Ordinarily, a table entry is typeset rigidly. It is not filled, broken, hyphenated, adjusted, or populated with additional inter- sentence space. ... Text blocks are formatted as was the text prior to the table, modified by applicable column descriptors. ... Add na or ad requests to the beginning of a text block to alter its adjustment distinctly from other text in the document. As with other table entries, when a text block ends, any alterations to formatting parameters are discarded. They do not affect subsequent table entries, not even other text blocks." * Apropos of the foregoing, add `na` and `nh` requests to the "Interface" columns of MT-safety tables in pages' "ATTRIBUTES" sections, so that C function names are not inappropriately hyphenated. I produced this change with the following GNU sed script. :start /^\.ad l/{N;/\n\.nh/{N;/\n\.TS/s/.*/.TS/}} /^\.TE/{N;/\n\.hy/{N;/\n\.ad/s/.*/.TE/}} /^Interface.*Attribute.*Value/{N;/\nT{/s/.*/&\n.na\n.nh/ :loop n /T{/s/.*/&\n.na\n.nh/ /^\.TE/b start; b loop } Signed-off-by: "G. Branden Robinson" <g.branden.robinson@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'man3/regex.3')
-rw-r--r--man3/regex.310
1 files changed, 6 insertions, 4 deletions
diff --git a/man3/regex.3 b/man3/regex.3
index 630c0369d7..1724843e19 100644
--- a/man3/regex.3
+++ b/man3/regex.3
@@ -311,26 +311,28 @@ Invalid back reference to a subexpression.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR regcomp (),
.BR regexec ()
T} Thread safety MT-Safe locale
T{
+.na
+.nh
.BR regerror ()
T} Thread safety MT-Safe env
T{
+.na
+.nh
.BR regfree ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
POSIX.1-2008.