| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
* document several missing ESCAPE_* constants
* some sequences are no longer ignored
* more information about what this function is used for
* better mark up output arguments
* improve some ordering
* drop the BUGS section, all that is almost completely fixed now
|
|
|
|
|
| |
it was changed some time ago;
patch from Paul <Eggert at cs dot ucla dot edu>
|
|
|
|
| |
infinite recursion in macro argument expansion
|
|
|
|
|
|
|
|
|
|
| |
correctly check for failure of the in-place expansion function.
If an argument not only does recursive delayed expansion
but infinitely recursive delayed expansion, this bug could
result in an ESCAPE_EXPAND assertion failure.
Thanks to Eric van Gyzen <vangyzen at FreeBSD> for finding this bug
by inspecting FreeBSD source code.
|
|
|
|
| |
recursive delayed expansion of escape sequences in macro arguments
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
expansion, re-check for all contained escape sequences whether they
need delayed expansion, not just for the particular escape sequences
that triggered delayed expansion in the first place. This is needed
because delayed expansion can result in strings containing nested
escape sequences recursively needing delayed expansion, too.
This fixes an assertion failure in krb5_openlog(3), see:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266882
Thanks to Wolfram Schneider <wosch at FreeBSD> for reporting the bug
and to Baptiste Daroussin <bapt at FreeBSD> for forwarding the report.
|
| |
|
|
|
|
|
|
| |
It matters because users of "mandoc -T html" typically need it.
Issue found in a conversation with Alejandro Colomar <alx at kernel aot org>.
|
|
|
|
|
|
|
|
|
|
|
| |
pages that Alejandro Colomar recommends in the "Lists" subsection of
https://man7.org/linux/man-pages/man7/man-pages.7.html#STYLE_GUIDE .
For example, this will improve HTML formatting of the first list in
the subsection "Feature test macros understood by glibc" on the page
https://manpages.debian.org/bookworm/manpages/ftm.7.en.html .
Issue reported by Alejandro Colomar <alx at kernel dot org>.
|
| |
|
|
|
|
|
|
| |
and the purpose and limitations of the embedded stylesheet.
Triggered by a conversation with Alejandro Colomar <alx at kernel dot org>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is supported by all major man(7) implementations that G. Branden
Robinson and myself are aware of, so calling it "non-portable" can
no longer be justified. Using it becomes increasingly more common,
so calling it "non-standard" is now misleading. It is certainly
useful and not deprecated.
While here, also remove the word "non-standard" from the descriptions
of several other macros because it is slightly confusing. A formal
standard for the man(7) language does not exist. Arguably, Version 7
AT&T UNIX used to be a de-facto standard, but its influence has been
waning for 40 years, and various features that Version 7 did not
support are now widely used.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
confusing warning messages complaining about macros that don't even
appear in the input file.
As a welcome side effect, this also shortens the code...
Fixing a minibug
reported by Alejandro Colomar <alx dot manpages at gmail dot com>.
|
| |
|
|
|
|
| |
From kn@, OK jmc@.
|
|
|
|
|
|
| |
It's nothing but obfuscation and only used at three places in a single file.
Removing it also makes the code three lines shorter.
The ugliness was already pointed out six years ago by mmcc@.
|
|
|
|
| |
After tbl_term.c 1.79, such contortions are no longer needed.
|
| |
|
|
|
|
|
|
|
|
|
| |
vertical space after boxed tables).
I'm committing this separately because trying to regenerate the
desired output with groff-current reveals an unrelated, recent
regression in groff. So i fixed the groff output by hand before
committing it, to get rid of the effect of the roff regression.
|
|
|
|
|
| |
and tbl_term.c rev. 1.79 cause quite a bit of churn, unfortunately.
This commit cleans up most of it.
|
|
|
|
|
|
|
|
|
| |
Skipping such space used to be a bug in GNU tbl(1), and a kludge
was added to mandoc to produce identical output.
The bug was fixed in groff commit 8818c07c Jul 30 2022 gbranden@
https://savannah.gnu.org/bugs/index.php?49390
Consequently, now is the time to get rid of the kludge.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Same change as in groff commit 7ec36dc9 Jul 30 2022 gbranden@
For more details, see https://savannah.gnu.org/bugs/index.php?62841
This change makes sense because:
* It improves the formatting of more pages than it degrades.
* Existing manual pages are wildly inconsistent in which behaviour they
expect: apparently few manual page authors understood the old rules.
* It simplifies the rules of how .TS behaves in man(7)
and makes them more similar to how it behaves in mdoc(7).
* It improves flexibility, making it possible for a table to immediately
follow preceding text without a blank line, which some existing pages
want to use, for example XCreateWindow(3).
|
|
|
|
|
|
|
|
|
|
|
|
| |
when comparing section headers. For example, ".Sh SEE ELSEWHERE"
and ".Sh SEE Em ALSO" were considered instances of a SEE ALSO
section. In groff-current, exact matches with no sub-macros are
required. Adjust mandoc behaviour.
While here, also fix a very minor mandoc bug, even though no
detrimental effect of the bug on formatting is known. While using
sub-macros in the .Sh HEAD is bad style, the parsers accept it, so
setting the section attribute on the HEAD needs to act recursively.
|
|
|
|
| |
The new version of the output file was generated with groff-current.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
macros .B, .I, .SM, and .SB that the next-line scope extends
to the end of the next logical input line and is not extended
if that line ends with a \c (no-space) escape sequence.
While improving a loosely related feature in the man(7) .TP
macro, a regression entered the groff codebase in groff
commit 3549fd9f (28-Apr-2017) caused by the usual sloppiness
of Bjarni Ingi Gislason. Since that time, groff wrongly had \c
extend next-line scope to a second line for these macros.
In man.c rev. 1.127 (25-Aug-2018) i synched mandoc behaviour
with groff in this respect, unfortunately failing to notice
the recent regression in groff. The groff regression was
finally fixed by gbranden@ in commit 09c028f3 (07-Jun-2022).
With the present commit, mandoc is back in sync with both GNU and
Heirloom roff regarding the interaction of single-font macros with \c.
|
|
|
|
| |
when multiple input or output lines are involved.
|
|
|
|
|
|
| |
The new version of this file was generated with groff-current.
Heirloom nroff produces exactly the same output for the content
of the DESCRIPTION.
|
|
|
|
|
|
| |
line, use the current output position as the reference position
for tabs on that input line. This brings mandoc in line with the
behaviour of GNU, Heirloom, and Plan 9 roff.
|
|
|
|
|
| |
move it to the top level include file mandoc.h to reduce the risk of causing
clashes when introducing new ASCII_* constants in the future.
|
|
|
|
| |
after vertical spacing was improved in man_term.c rev. 1.239.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
at the beginning of the node handler, in the same way as it is done
in the mdoc(7) node handler.
As a side effect, this also fixes a bug: if an input line contained
nothing but an escape sequence producing no output whatsoever (for
example, \fR), the old code incorrectly emitted a blank line anyway,
whereas the new code only emits such a blank link if the input line
actually produces output (even invisible zero-width output). To make
the distinction, the ASCII_NBRZW -> lastcol -> term_newln() mechanism
established in term.c rev. 1.289 is used.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
whatsoever (for example \fR) and escape sequences that produce
invisible zero-width output (for example \&). No, i'm not joking,
groff does make that distinction, and it has consequences in some
situations, for example for vertical spacing in no-fill mode.
Heirloom and Plan 9 behaviour is subtly different, but in case of
doubt, we want to follow groff.
While this fixes the behaviour for the majority of escape sequences,
in particular for those most likely to occur in practice, it is not
perfect yet because some of the more exotic ESCAPE_IGNORE sequences
are actually of the "no output whatsoever" type but treated
as "invisible zero-width" for now. With the new ASCII_NBRZW mechanism
in place, switching them over one by one when the need arises will
no longer be very difficult.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
not to *output* lines. In particular, if an input line gets broken in
fill mode and a tab occurs in the second output line, it advances to a
position of at least (width of the first output line) + (width of a
space character even though this is never printed) + (width of the part
of the second output line that precedes the tab).
Implement the same logic in mandoc.
Again, do not use tabs in filled text: they have surprising effects,
including this one.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
non-breakable in exactly the same way as "\ ". That is, the preceding
word, the tab character, and the following word are always kept
together on the same output line. If filling is enabled and an
output line break is required before the end of the following word,
the break occurs before the beginning of the preceding word.
Make mandoc behave in the same way.
Of course, using literal tab characters in filled text remains a
bad idea, and the "WARNING: tab in filled text" remains unchanged.
|
| |
|
|
|
|
|
| |
from being turned into underscores;
bug reported by <Eldred dot fr> Habert
|
|
|
|
| |
Also, mention /usr/ucb/man because /usr/bin/man did not provide -f in 4.0BSD.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Leaving the body empty is legitimate in this case if the author only
wants to display a mail address or URI without providing a link text.
Output modules already handle this correctly: terminal output shows
just the URI without an accompanying text, HTML output uses the URI
for *both* the href= attribute and as the content of the <a> element.
The documentation was also wrong and claimed that an .MT or .UR block
with an empty body would produce no output. As explained above,
this isn't true.
Bogus warning reported by
Alejandro Colomar <alx dot manpages at gmail dot com>.
|
|
|
|
|
| |
after they were changed in OpenBSD.
Tracking these rules here would be useless.
|
|
|
|
| |
Patch from Anna Vyalkova <cyber at sysrq dot in>, significantly tweaked by me.
|
|
|
|
|
|
|
| |
"Start names with a capital letter;
it helps some screen readers speak them with appropriate inflection."
Anna Vyalkova already did that correctly when sending patches,
but i ruined it when committing, so fix it now.
|
| |
|
|
|
|
| |
discussed with Anna Vyalkova <cyber at sysrq dot in>
|
|
|
|
|
|
|
|
|
|
|
|
| |
document, <h1> is intended for top level headers, and most of the
sections in a manual page can hardly be considered top-level.
It is more usual to use <h1> only for the main title of the document
of for the site name.
Consequently, move .Sh/.SH from <h1> to <h2> and .Ss/.SS from <h2>
to <h3>, freeing <h1> for use by header.html in man.cgi(8).
Discussed with Anna Vyalkova <cyber at sysrq dot in>.
|
|
|
|
|
|
|
|
|
|
|
| |
and use flexbox CSS instead. Improve accessibility by adding role
and aria-label attributes to these header and footer lines.
Using ideas from both Anna Vyalkova <cyber at sysrq dot in> and myself.
As a welcome side effect, this also resolves the long-standing issue
that the rendering was always 65em wide, requiring horizontal scrolling
when the window was narrower. Now, rendering nicely adapts to browser
windows of arbitrary narrowness.
|
|
|
|
|
|
| |
before and outside the <header> element.
Fix this by moving it into the <header> element where it belongs.
While here, also wrap footer.html in a <footer> element.
|
|
|
|
|
|
|
| |
in particular adding <header>, <main>, and <nav> elements
and role and aria-label attributes in several places.
Patch from Anna Vyalkova <cyber at sysrq dot in>,
minimally tweaked by me.
|
|
|
|
|
|
|
| |
between the <head> and the <body> rather than before the <head>
because the <meta charset="utf-8"/> element ought to be within
the first 1024 bytes of the HTML code.
Issue found with validator.w3.org.
|