| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
with mandoc -Tman; suggested by Thomas Klausner <wiz at NetBSD>
|
| |
|
|
|
|
|
| |
containing nothing but a single hyphen, the pointer got incremented
twice at one point, causing a read overrun found by naddy@.
|
|
|
|
| |
Suggested by Thomas Klausner <wiz at NetBSD>; discussed with jmc@.
|
|
|
|
|
| |
partial explicit macros. Leah Neukirchen <leah at vuxu dot org>
rightfully points out that the check makes no sense for these macros.
|
|
|
|
|
| |
an architecture argument and the second with an invalid one.
Bug found by jsg@ with afl(1).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for man(1) lookup. For OpenBSD base and Xenocara, that functionality
was never intended to be required, and i just fixed the last handful
of offenders using it - not counting the horribly ill-designed
interfaces engine(3) and lh_new(3) which are impossible to properly
document in the first place.
Of course, apropos(1) and whatis(1) continue to use SYNOPSIS .Nm,
.Fn, and .Fo macros, so "man -k ENGINE_get_load_privkey_function"
still works.
This change also gets rid of a few bogus warnings "cross reference
to self" which actually are *not* to self, like in yp(8).
This former functionality was intended to help third-party software
in the ports tree and on non-OpenBSD systems containing manual pages
with incomplete or corrupt NAME sections. But it turned out it did
more harm than good, and caused more confusion than relief,
specifically for third party manuals and for maintainers of
mandoc-portable on other operating systems. So kill it.
Problems reported, among others, by Yuri Pankov (illumos).
OK jmc@
|
|
|
|
|
|
|
| |
segfaults on certain hardened versions of glibc. Triggered by .sp
or blank lines right before .SS or .SH, or before the first .Sh.
Found the hard way by Dr. Markus Waldner on Debian
and by Leah Neukirchen on Void Linux.
|
|
|
|
| |
getpgid(2), ac(8), ldconfig(8), mount_ffs(8), sa(8), ttyflags(8), ...
|
|
|
|
|
| |
don't just talk about ignoring it, actually do ignore it.
No change for terminal output, improves HTML output.
|
|
|
|
| |
the idea came up in a discussion with Thomas Klausner <wiz at NetBSD>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
in the base system, inspired by mdoclint(1).
We are able to do this because (1) the -mdoc parser, the -Tlint validator,
and the man(1) manual page lookup code are all in the same program
and (2) the mandoc.db(5) database format allows fast lookup.
Feedback from, previous versions tested by, and OK jmc@.
A few features will be added to this in the tree, step by step.
|
|
|
|
| |
triggered by a question from Yuri Pankov (illumos)
|
|
|
|
| |
by an isolated closing delimiter; inspired by mdoclint
|
|
|
|
|
|
| |
I'm using a very simple, linear time / zero space fuzzy string
matching heuristic rather than a full Levenshtein metric, to keep
the code both simple and fast.
|
|
|
|
| |
inspired by mdoclint
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Wopenbsd and -Wnetbsd to check conventions for the base system of
a specific operating system. Mark operating system specific messages
with "(OpenBSD)" at the end.
Please use just "-Tlint" to check base system manuals (defaulting
to -Wall, which is now -Wbase), but prefer "-Tlint -Wstyle" for the
manuals of portable software projects you maintain that are not
part of OpenBSD base, to avoid bogus recommendations about base
system conventions that do not apply.
Issue originally reported by semarie@, solution using
an idea from tedu@, discussed with jmc@ and jca@.
|
| |
|
| |
|
|
|
|
|
| |
and operating system dependent messages about missing or unexpected
Mdocdate; inspired by mdoclint(1).
|
| |
|
|
|
|
|
|
|
| |
In practice, that message only matters inside .Bf, and even there, it
can occasionally be a false positive. In all other cases, it usually
is a false positive, so it is better to drop it outright.
Suggested by jmc@.
|
|
|
|
| |
This brings us down to one false positive for about every 18 pages.
|
|
|
|
| |
inspired by mdoclint(1), and jmc@ considers it useful
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
not a WARNING because they don't endanger portability
|
|
|
|
| |
inspired by mdoclint
|
|
|
|
| |
now that this actually saves code: -70 LOC.
|
| |
|
|
|
|
|
| |
modules to the new roff(7) modules. As a side effect,
mdoc(7) now handles .ft, too. Of course, do not use that.
|
|
|
|
|
| |
Generate the first node on the roff level: .br
Fix some column numbers in diagnostic messages while here.
|
|
|
|
| |
no functional change, minus two source files, minus 200 lines of code.
|
|
|
|
| |
and warn about it; mdoclint(1) does so, and it makes sense.
|
|
|
|
|
|
|
|
| |
* Make enum rofft an internal interface as enum roff_tok in "roff.h".
* Represent mdoc and man macros in enum roff_tok.
* Make TOKEN_NONE a proper enum value and use it throughout.
* Put the prologue macros first in the macro tables.
* Unify mdoc_macroname[] and man_macroname[] into roff_name[].
|
|
|
|
|
| |
Warn if that macro occurs elsewhere.
Triggered by a question from Dag-Erling Smoergrav <des @ FreeBSD>.
|
|
|
|
|
|
|
|
|
|
| |
argument, but also when the first argument is a child macro.
Arcane issue found in the FreeBSD cxgbetool(8) manual that Baptiste
Daroussin <bapt at FreeBSD> sent me long ago for a different reason.
While solving this, switch to the new technique of doing text
production in the validator, reducing code duplication in the
formatters, which also makes -Ttree output clearer.
|
|
|
|
|
|
|
|
|
| |
rather than in the formatters. Use NODE_NOSRC flag for .Lb and
NODE_NOSRC and NODE_NOPRT for .St. Results in a more rigorous
syntax tree and in 135 lines less code.
This work was triggered by a question from Abhinav Upadhyay <er dot
abhinav dot upadhyay at gmail dot com> (NetBSD) on discuss@.
|
|
|
|
| |
More rigorous AST and 40 lines less code.
|
|
|
|
|
| |
stage rather than in each and every individual formatter, using the
new NODE_NOSRC flag. More rigorous and also ten lines less code.
|
| |
|
|
|
|
|
|
|
|
|
| |
Use them to mark generated nodes and nodes that shall not produce output.
Let -Ttree output mode display these new flags.
Use NODE_NOSRC for .Ar, .Mt, and .Pa default arguments.
Use NODE_NOPRT for .Dd, .Dt, and .Os.
These will help to make handling of text production macros more rigorous.
|
|
|
|
|
|
|
| |
It's used in half a dozen pages.
Even though i have been thinking about it for years,
i still can't suggest anything better.
The false positives are annoying.
|
|
|
|
|
|
|
| |
- require a comma between names
- reject all other text nodes
- reject all empty Nm below NAME, not only in the leading position
- reject Nm after Nd
|
|
|
|
|
|
| |
In fact, we have been requiring it for many years.
The only reason to not warn when it was missing
was excessive traditionalism - it was optional in 4.4BSD.
|
|
|
|
|
|
|
|
|
|
|
|
| |
and just let it default to -width 6n, which agrees with the
traditional -width Ds that is still in widespread use.
I just pushed a patch upstream to GNU roff that does the same for
groff_mdoc(7). Before, groff contained code that was even more
complicated than mandoc, but both resulted in quite different
user-visible output. Now, both agree, and output is nicer for both.
Useless complication noticed by Carsten Kunze (Heirloom roff).
|