| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Jan Stary <hans at stare dot cz> found it in an ancient groffer(1)
manual page (version 1.19) on MacOS X Mojave.
Having .break not implemented wasn't a particularly bright idea
because obviously, it tended to cause infinite loops.
|
| |
|
|
|
|
|
|
|
|
| |
for hyphen-minus, soften the language a bit: writing \- for it is
not wrong, and people started sending us patches to replace \- with '-'
in existing manual pages, which is not a worthwhile change unless
the \- is used at a place where it doesn't belong.
OK jmc@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of any cell span, not to the maximum *left* edge, which may be smaller
if the last column of the table is only reached by horizontal spans,
but not by any regular cell in any row of the table.
Otherwise, the algorithm calculating column widths accessed memomy
after the end of the colwidth[] array, while it was trying to handle
the rightmost column(s).
Crash reported by Jason Thorpe <thorpej at NetBSD>
via https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=54069
and via Thomas Klausner (wiz@).
Christos@ Zoulas sent a (correct, but slightly confusing) patch.
The patch i'm committing here is easier to understand.
|
|
|
|
|
|
|
| |
the line input buffer to a length of one byte, do not write one byte
past the end of the line input buffer. Minimal code to show the bug:
printf ".ds X\n.X\n\n" | MALLOC_OPTIONS=C mandoc
Bug found by bentley@ in the sysutils/rancid par(1) manual page.
|
|
|
|
| |
that bentley@ found in syncthing-bep(7)
|
|
|
|
|
|
| |
so "roff.h" must be included before it.
Diff from bcallah@ tweaked by me;
he found the bug by compiling with pcc.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sufficient to look at two data rows, but up to three are needed:
the one above to identify vertical lines branching off upward, the
row itself (in case the line is in a data row rather than a layout
line) to figure out the horizontal line style, and the row below
to identify vertical lines branching off downward.
As an example, bentley@ reported from the mpv(1) manual page that
in a tbl(7) having a vertical line in the middle and a horizontal
line in the bottom data row, the vertical line extended below the
bottom horizontal line.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
using __dead instead of __attribute__((__noreturn__)) actually
hinders portability rather than helping it.
Given that mandoc already uses __attribute__ in several files
and that in the portable version, ./configure already contains
rudimentary support for ignoring it on platforms that do not
support it, use __attribute__ directly.
This is expected to fix build failures that Stephen Gregoratto
<dev at sgregoratto dot me> reported from Arch and Debian Linux.
|
|
|
|
| |
based on a patch by Christos@ Zoulas at NetBSD
|
| |
|
|
|
|
|
| |
Useful on illumos and on Oracle Solaris, where it doesn't.
Patch written based on a report from Sevan Janiyan.
|
|
|
|
| |
Omission noticed by espie@ long ago, and wording tweaked by jmc@.
|
| |
|
|
|
|
| |
default /bin/sh on Solaris 10, so use the classical form
|
| |
|
|
|
|
| |
found while testing on Debian jessie
|
|
|
|
| |
found by a compiler warning from gcc 4.9.2 on Linux
|
| |
|
| |
|
| |
|
|
|
|
|
| |
needed for Alpine Linux because it uses busybox less(1) by default;
based on a patch from Daniel Sabogal explained to me by Natanael Copa
|
|
|
|
|
|
| |
like almost all other userland programs. This also improves
portability: for example, it looks like <sys/termios.h> does not
work on FreeBSD, or at least bapt@ did the same change over there.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
name is not found and the requested architecture is unknown, complain
about the architecture rather than about the manual page name:
$ man -S vax cpu
man: Unknown architecture "vax".
$ man -S sparc64 foobar
man: No entry for foobar in the manual.
Friendlier error message suggested by jmc@, who also OK'ed the patch.
|
|
|
|
|
| |
was abused to detect an input line break;
instead, use the NODE_LINE flag to improve robustness.
|
| |
|
|
|
|
|
|
|
|
| |
after processing each manual page, such that the next page
starts from a clean state and doesn't continue suffix numbering.
Issue found while looking at https://github.com/Debian/debiman/issues/48
which was brought up by Orestis Ioannou <oorestisime at github>.
|
| |
|
|
|
|
|
|
| |
Instead, use a tagged list and the canonical .Ic macro
as it is natural for such purposes.
While here, also delete heaps of needless escaping.
|
| |
|
|
|
|
|
|
|
|
|
| |
head argument of *, \-, or \(bu as <ul> rather than as <dl>,
using a bit of heuristics.
Basic idea suggested by Dagfinn Ilmari Mannsaker <ilmari at github>
in https://github.com/Debian/debiman/issues/67 and independently by
<Pali dot Rohar at gmail dot com> on <discuss at mandoc dot bsd dot lv>.
|
|
|
|
|
|
| |
as recommended for accessibility by the HTML 5 standard.
Triggered by a similar, but slightly different suggestion
from Laura Morales <lauretas at mail dot com>.
|
|
|
|
|
| |
as a single <dl> list rather than opening a new list for each item;
feature suggested by Pali dot Rohar at gmail dot com.
|
|
|
|
|
|
|
|
|
|
|
| |
caused confusion in the past. People plainly do not expect that
there are limits to the compatibility between Unicode and ASCII,
but there are.
The information belongs here and not into mandoc_char(7) because
it explains how the specific output device (-T ascii) works and
because it has nothing to do with the question of how characters
are represented on the input side.
|
|
|
|
|
| |
connects to the horizontally adjacent vertical line or cell;
fixing a bug reported by bentley@.
|
|
|
|
| |
in UTF-8 output; suggested by bentley@
|
|
|
|
| |
fixing a minibug reported by bentley@
|
| |
|
|
|
|
|
|
|
|
|
|
| |
original commit message:
.Pp
.Bd ... -compact
is better written as
.Bd ...
|
|
|
|
|
| |
In facts, i works very similarly to .Em and .Sy.
Triggered by a question from Kurt Mosiejczuk <kurt at cranky dot work>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and audit all its callers whether termination is handled correctly.
Resulting improvements:
* An escape or tab ending the macro name in a macro invocation
is discarded, and argument processing is started after it.
* An escape or tab ending a name in ".if d" and ".if r" is preserved.
* An escape ending a name in ".ds" causes the whole request to be ignored.
* A tab ending a name in ".ds" becomes part of the string.
* An escape or tab ending a name in ".rm"
causes the rest of the line to be ignored.
* An escape or tab ending the first name in ".als", ".rn", or ".nr"
causes the whole request to be ignored.
Kurt Jaeger <pi at FreeBSD> made me aware of
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235456#c0
and in that bug report, comment 0 item (3) is a special case
of this class of issues.
Yes, the "mh" manual pages are no doubt among the worst on the planet.
|
| |
|
|
|
|
|
|
|
| |
URIs like https://man.openbsd.org/OpenBSD-2.2/cat1/cat.0
are still required to work because they result from apropos searches for
old releases (up to 5.0) which used to install preformatted manual pages.
Regression reported by jj@.
|
|
|
|
|
| |
test table centering in an mdoc(7) document as well.
Related to tbl_term.c rev. 1.67.
|
|
|
|
|
|
|
|
|
|
| |
Since resetting of offsets works quite differently in the mdoc(7)
and man(7) formatters, the tbl(7) formatter needs to save the global
offset on entry and restore it on exit. The additional indentation
needed for table centering has to be added to its own offset variable
and applied to each line of the table, rather than only to the first.
Bug found by bentley@ in emulators/fceux(6).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
which establish phrasing context, but they can contain paragraph
breaks (which is relevant for terminal formatting, so we can't just
change the structure of the syntax tree), which are respresented
by <p> elements and cannot occur inside <a>.
Fix this by prematurely closing the <a> element in the HTML formatter.
This menas that the clickable text in HTML output is shorter than
what is represented as the link text in terminal output, but in
HTML, it is frankly impossible to have the clickable area of a
hyperlink extend across a paragraph break. The difference in
presentation is not a major problem, and besides, paragraph breaks
inside .UR are rather poor style in the first place.
The implementation is quite tricky. Naively closing out the <a>
prematurely would result in accessing a stale pointer when later
reaching the physical end of the .UR block. So this commit separates
visual and structural closing of "struct tag" stack items. Visual
closing means that the HTML element is closed but the "struct tag"
remains on the stack, to avoid later access to a stale pointer and
to avoid closing the same HTML element a second time later.
This also needs reference counting of pointers to "struct tag" stack
items because often more than one child holds a pointer to the same
parent item, and only the outermost child can safely do the physical
closing.
In the whole corpus of nearly half a million manual pages on
man.openbsd.org, this problem occurs in exactly one page: the
groff(1) version 1.20.1 manual contained in DragonFly-3.8.2, which
contains a formatting error triggering the bug.
|
|
|
|
|
| |
The two entries about dashes, hyphens, and minus signs are no longer
relevant because we decided on a policy that is now documented.
|
|
|
|
| |
copy mode is complicated and prone to regressions.
|
|
|
|
|
|
| |
inter-word spacing, let's try again with 250 AFM units.
Regression caused during my recent term_flushln() reorg in rev. 1.278,
reported by brynet@ (sorry and many thanks for reporting).
|