| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
include mandoc_aux.h or mandoc.h need to include config.h, too.
It is suspected that for example IRIX needs this, or it is likely
to throw errors in these files because the system compiler doesn't
understand __attribute__.
Issue reported by Kazuo Kuroi <kazuo at irixnet dot org>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
they are skipped when looking for previous or following high-level
macros. Examples include roff(7) .ft, .ll, and .ta, mdoc(7) .Sm
and .Tg, and man(7) .DT and .PD. Use this concept for a variety
of improved decisions in various validators and formatters.
While here,
* remove a few const qualifiers on struct arguments that caused trouble;
* get rid of some more Yoda notation in the vicinity;
* and apply some other stylistic improvements in the vicinity.
I found this class of issues while considering .Tg patches from kn@.
|
| |
|
|
|
|
|
|
| |
simpler and always more robust. In particular, move the nesting
warnings for .EX and .EE from man_state(), where they were misplaced,
to the man(7) validator.
|
|
|
|
|
|
| |
parser to the roff(7) parser. As a side effect, .nf and .fi are
now also parsed in mdoc(7) input, though the mdoc(7) formatters
still ignore most of their effect.
|
|
|
|
|
|
|
|
|
| |
Unify handling of \f and .ft.
Support \f4 (bold+italic).
Support ".ft BI" and ".ft CW" for terminal output.
Support the .ft request in HTML output.
Reject the bogus fonts \f(C1, \f(C2, \f(C3, and \f(CP.
In regress.pl, only strip leading whitespace in math mode.
|
|
|
|
|
|
|
|
| |
from mandoc_msg(), where it is no longer used.
While here, rename mandoc_vmsg() to mandoc_msg() and retire the
old version: There is really no point in having another function
merely to save "%s" in a few places.
Minus 140 lines of code.
|
|
|
|
|
|
|
|
|
|
|
| |
Finally, drop support for the run-time configurable mandocmsg()
callback. It was over-engineered from the start, never used for
anything in a decade, and repeatedly caused maintenance headaches.
Consolidate reporting infrastructure into two files, mandoc.h and
mandoc_msg.c, mopping up the bits and pieces that were scattered
around main.c, read.c, mandoc_parse.h, libmandoc.h, the prototypes
of four parsing-related functions, and both parser structs.
|
|
|
|
|
|
|
|
|
| |
blank, rather than teaching each formatter individually to ignore
the .br in such situations. That's simpler and also results in
better diagnostics.
Mark Harris <mark dot hsj at gmail dot com> reported
that -T html got confused in particular.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
combinations are handled, and are handled in a systematic manner.
This resolves some erratic duplicate handling, handles a number of
missing cases, and improves diagnostics in various respects.
Move validation of .br and .sp to the roff validation module
rather than doing that twice in the mdoc and man validation modules.
Move the node relinking function to the roff library where it belongs.
In validation functions, only look at the node itself, at previous
nodes, and at descendants, not at following nodes or ancestors,
such that only nodes are inspected which are already validated.
|
|
|
|
|
| |
and some groff manual pages actually use them in .ft requests.
It's easy enough to handle these .ft requests in mandoc, too.
|
|
|
|
|
|
| |
This clearly works when .po is called on the top level, but might
not be sophisticated enough if people call .po inside indentation-changing
contexts, but i haven't seen that in manual pages (yet :).
|
| |
|
|
|
|
|
| |
of input lines without filling).
Contrary to groff, high-level macros abort .ce mode for now.
|
|
|
|
|
|
| |
The Tcl/Tk manual pages use this extensively.
Delete the TERM_MAXMARGIN hack, it breaks .mc inside .nf;
instead, implement a proper TERMP_BRNEVER flag.
|
|
|
|
| |
Needed by about four dozen ports (thanks to naddy@ for the research).
|
|
|
|
|
|
| |
This is the first feature made possible by the parser reorganization.
Improves the formatting of the SYNOPSIS in many Xenocara GL manuals.
Also important for ports, as reported by many, including naddy@.
|
|
|
|
| |
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.
|