| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Almost completely mechanical, no functional change.
Written on the train from Exeter to London returning from p2k15.
|
|
|
|
|
| |
Drop one enum type, two static functions, 70 lines of code.
Also fixes the mpeg_encode(1) manual reported broken by naddy@.
|
|
|
|
|
|
|
|
| |
of block rewinding, just like then mdoc(7) parser did.
First step in getting rid of rew_scope():
Replace the only call where the target block is known.
This commit is analogous to mdoc_macro.c rev. 1.167.
One down, three to go.
|
|
|
|
|
|
|
|
|
| |
Replace struct mdoc_node and struct man_node by a unified struct roff_node.
To be able to use the tok member for both mdoc(7) and man(7) without
defining all the macros in roff.h, sacrifice a tiny bit of type safety
and make tok an int rather than an enum.
Almost mechanical, no functional change.
Written on the Eurostar from Bruxelles to London on the way to p2k15.
|
|
|
|
|
|
| |
Replace enum mdoc_type and enum man_type by a unified enum roff_type.
Almost mechanical, no functional change.
Written on the ICE train from Frankfurt to Bruxelles on the way to p2k15.
|
|
|
|
| |
Issue reported by Christian Neukirchen <chneukirchen at gmail dot com>.
|
|
|
|
|
|
|
| |
1. MAN_EXPLICIT was used iff fp == blk_exp, so just test fp.
2. MAN_FSCOPED was used only for TP, so just test for TP.
3. MAN_NOCLOSE was completely unused.
No functional change.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
parser. Simplify the code by moving it into the roff(7) parser, also
making it work for mdoc(7).
|
| |
|
|
|
|
|
| |
just like explicit block macros themselves.
Fixing an assertion failure jsg@ found with afl.
|
|
|
|
| |
and some cleanup; no functional change, minus 70 lines.
|
|
|
|
|
|
|
| |
the same way the mdoc(7) macros marked MDOC_JOIN do it.
In -Thtml, this removes bogus <br/> when the font macros are used
in no-fill mode; issue found by jsg@ in the Xcursor(3) SYNOPSIS.
As a bonus, this slightly reduces the size of the syntax tree.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
validation, man_node_unlink() switches to MAN_NEXT_CHILD. After
that, we have to switch back to MAN_NEXT_SIBLING after completing
validation, or subsequent parsing would add content into an already
closed node, clobbering potentially existing children, causing
information loss and a memory leak. Bug found by kristaps@ with
valgrind in groff(7) on Mac OS X.
Note that the switch back must be conditional, for if the node being
validated itself gets deleted, we must *not* go to MAN_NEXT_SIBLING,
which would not only yield wrong results in general but also crash
in malformed manuals having an empty paragraph before the first .SH,
for example OpenBSD c++filt(1).
|
|
|
|
|
|
| |
Include <sys/types.h> where needed, it does not belong in config.h.
Remove <stdio.h> from config.h; if it is missing somewhere, it should
be added, but i cannot find a *.c file where it is missing.
|
|
|
|
|
|
| |
Detect the condition earlier, report in the error message
which block is broken, and delete the broken block.
Consequently, empty section headers can no longer happen.
|
| |
|
| |
|
|
|
|
| |
Hierarchical naming and mention macro names in messages.
|
|
|
|
|
|
| |
removing one function argument, one function definition,
three function invocations and two pointless assert()s.
No functional change.
|
|
|
|
|
| |
remove trailing whitespace and blanks before tabs, improve some indenting;
no functional change
|
|
|
|
|
| |
Found by naddy@ in the textproc/enchant(1) port.
Of course, do not use this in new manuals.
|
|
|
|
| |
No functional change.
|
|
|
|
| |
suggested by Thomas Klausner <wiz @ NetBSD dot org>.
|
|
|
|
| |
Patch from Franco Fichtner <franco at lastsummer dot de> (DragonFly).
|
|
|
|
|
|
|
|
| |
close below-subsection implicit scopes that may still be open.
In the formatter, make sure indentation is reset when leaving a scope,
not only when entering the next one.
Improves the formatting of gpg(1); issue reported by jca on ports.
|
|
|
|
|
|
|
|
| |
man-ext macros by Eric S. Raymond, enabled by default in groff_man(7).
Usual disclaimer: You don't write new man(7) code, so you are not going
to use these, either.
Improves e.g. the bzr(1) and etherape(1) manuals.
Thanks to naddy@ for bringing these to my attention.
|
|
|
|
|
|
|
|
| |
Settle for "struct man *man", "struct mdoc *mdoc", "struct meta *meta"
and avoid the confusing "*m" which was sometimes this, sometimes that.
No functional change.
ok kristaps@ some time ago
|
|
|
|
|
|
| |
The reason was that `RS' wasn't BSCOPE'd, so the next-line (BLINE) scope
opened by `TP' would still be in the HEAD macro.
This was from joerg@'s archive of failures.
|
|
|
|
|
|
|
|
| |
To allow doing so, no longer abuse rew_scope() to unwind explicit blocks;
explicitly call man_unscope() instead.
Fixing the indentation of slapd.conf(5) in the OpenLDAP port;
thanks to guenther@ for the report.
|
|
|
|
|
| |
Do not use this, it is not portable and only defined in esr's man-ext.
For example, sox(1) wants these macros.
|
|
|
|
| |
some man(7) changes to accomodate for the an-ext compatibility.
|
|
|
|
|
|
|
|
| |
because that will skip root node validation, potentially entering
rendering modules will NULL pointers lurking in the meta data.
Instead, always validate the root node and (as suggested by joerg@)
assert validity of the meta data before using it in the renderers.
ok joerg@
|
| |
|
|
|
|
| |
is raised later.
|
|
|
|
| |
on unknown macros.
|
|
|
|
|
|
|
|
| |
do not abort with a FATAL error, but report a report a WARNING,
remove the broken .TP from the syntax tree, and prod on.
Reported repeatedly by ports people, at least by brad@ and jeremy@.
Also fixes rendition(4) in Xenocara.
ok kristaps@
|
|
|
|
| |
found while syncing to OpenBSD
|
|
|
|
|
|
| |
in certain situations) caused the next macros to be assigned as siblings
instead of child nodes to the original parent. Noticed and ok by
schwarze@.
|
|
|
|
|
|
|
|
| |
accomodate for the fix, then for the front-ends. -T[x]html accepted the
syntax tree natively, but -Tascii had to use relative offsets. It's
quite a simple fix.
From a TODO by {dcoppa,dsoares}@openbsd.
|
|
|
|
|
|
|
|
| |
variable from mandoc_getarg() so that it prints the warning every time.
Then, remove the warning from args_checkpunct(). This way, warnings
are being posted at the correct time. This makes the flag argument to
mdoc_zargs() superfluous, so make it be zero when it's invoked. Finally,
move the args() flags into mdoc_argv.c and make them enums.
|
|
|
|
| |
function a parameter to suppress warnings.
|
|
|
|
|
|
| |
make its return value boolean (we don't care about QWORD). We can move
it into mdoc_macro.c because it's basically just a wrapper around
mandoc_getarg(). Then blow away man_argv.c, which is left empty.
|
|
|
|
|
| |
ARGS_ERROR, as it is never returned by man_args(). Then clean up
invocations of man_args() to only check for ARGS_EOLN.
|
|
|
|
|
| |
Don't have them do that (includes in header files = faugh), and have
individual files directly include these files.
|
|
|
|
|
|
|
|
|
| |
libroff, etc., etc.) route into mandoc_msg() and mandoc_vmsg(), for the
time being in libmandoc.h. This requires struct mparse to be passed
into the allocation routines instead of mandocmsg and a void pointer.
Then, move some of the functionality of the old mmsg() into read.c's
mparse_mmsg() (check against wlevel and setting of file_status) and use
main.c's mmsg() as simply a printing tool.
|
|
|
|
| |
Also convert man_vmsg to return void.
|