| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
For .it, ignore scaling units in roff_getnum().
Inside parentheses, skip whitespace after a sign in roff_getnum().
Parse and ignore unary plus in roff_getnum().
As a bonus, get rid of the only call to mandoc_strntoi() in roff.c.
|
|
|
|
| |
improved diagnostics, minus six lines of code
|
|
|
|
|
|
|
|
| |
Keeping track of the versions of installed software is the job of
the package manager, not of the individual binaries. If individual
binaries include version numbers, that tends to goad people into
writing broken configuration tests that inspect version numbers
instead of properly testing for features.
|
| |
|
|
|
|
|
| |
Ignore errors for now.
Patch from tedu@.
|
|
|
|
|
| |
could only be used in the SYNOPSIS section. It is fine anywhere.
Issue noticed by bentley@.
|
| |
|
|
|
|
|
| |
finally fixed the four issues explained in the mdoc_macro.c rev. 1.83
commit message.
|
|
|
|
|
|
| |
with newly opened .Bl -column lists;
fixing an assertion failure jsg@ found with afl:
test case #481, Bl It Bl -column It Bd El text text El
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
it, make_pending(), which was the most difficult function of the
whole mdoc(7) parser. After almost five years of maintaining this
hellhole, i just noticed the pointer isn't needed after all.
Blocks are always rewound in the reverse order they were opened;
that even holds for broken blocks. Consequently, it is sufficient
to just mark broken blogs with the flag MDOC_BROKEN and breaking
blocks with the flag MDOC_ENDED. When rewinding, instead of iterating
the pending pointers, just iterate from each broken block to its
parents, rewinding all that are MDOC_ENDED and stopping after
processing the first ancestor that it not MDOC_BROKEN. For ENDBODY
markers, use the mdoc_node.body pointer in place of the former
mdoc_node.pending.
This also fixes an assertion failure found by jsg@ with afl,
test case #467 (Bo Bl It Bd Bc It), where (surprise surprise)
the pending pointer got corrupted.
Improved functionality, minus one function, minus one struct field,
minus 50 lines of code.
|
|
|
|
| |
found by jsg@ with afl, test case #16
|
|
|
|
|
| |
eventually leading to NULL pointer access;
found by jsg@ with afl, text case #455.
|
|
|
|
|
|
|
|
| |
That could happen when their first argument was another called macro,
causing a NULL pointer access in .St validation found by jsg@ with afl.
Make in_line_argn() easier to understand by using one state
variable rather than two.
|
|
|
|
|
|
|
|
|
|
|
| |
is followed by the end of the input line instead of a font specifier.
Found by jsg@ with afl, test case #591.
While here, improve functionality as well:
* There is no "r" font modifier.
* Font specifiers (as opposed to font modifiers) are case sensitive.
* One-character font specifiers require trailing whitespace.
* Ignore parenthised and two-letter font specifiers.
|
|
|
|
| |
from Svyatoslav Mishyn <juef at openmailboxd dot org>, Crux Linux
|
|
|
|
|
| |
so if we are in a loop over blocks, cleanly restart the loop
rather than risking use after free; found by jsg@ with afl.
|
| |
|
|
|
|
|
| |
needed for some older versions of SunOS;
from jperkin@ via wiz@, both at NetBSD
|
| |
|
| |
|
|
|
|
| |
by more specific messages, improving diagnostics for .cc .tr .Bl -column
|
| |
|
| |
|
| |
|
|
|
|
|
| |
replacing the last instances by more specific warnings.
Improved functionality, minus 50 lines of code.
|
|
|
|
| |
better handle .Fo with more than one argument
|
| |
|
| |
|
| |
|
|
|
|
| |
Minus one struct member, minus 17 lines of code, no functional change.
|
|
|
|
|
| |
Discard empty .Bk blocks.
Improve related diagnostics.
|
|
|
|
| |
in particular, get rid of check_count(..., CHECK_EQ, 0)
|
| |
|
| |
|
|
|
|
| |
and the respective argument of check_count()
|
|
|
|
|
|
| |
using the file system lookup fallback code, also reducing the number
of preprocessor conditional directives.
Hopefully, it will make some small Linux distros happy.
|
| |
|
|
|
|
| |
(assertion failure); regression found in jsg@'s afl test case 847.
|
| |
|
|
|
|
|
|
|
| |
They were a maintenance and auditing nightmare because if you changed
one bit in there, stuff tended to break at seemingly unrelated places.
No functional change except getting rid of one bogus error message,
but minus 80 lines of code.
|
|
|
|
| |
as a bonus, get rid of another call to rew_sub().
|
|
|
|
|
|
| |
except that some error messages become less confusing.
Now the function is almost readable (but still requires
nineteen lines of comments for fourteen lines of code).
|
|
|
|
|
| |
the calling macro handler already found the breaking block.
No functional change except tiny variations in error messages.
|
|
|
|
|
| |
is known. This only leaves three that do actual searching.
No functional change, minus 30 lines of code.
|
|
|
|
|
|
| |
remain in other functions. As a bonus, this fixes an assertion failure
jsg@ found some time ago with afl (test case 982) and improves minor
details in error reporting.
|
|
|
|
|
|
|
|
|
| |
block closure macro it calls, do not attempt to open its body.
This can for example happen for (nonsensical) constructions like
.Fo
.Nm Fc
in the SYNOPSIS. Fixing an assertion failure jsg@ found with afl
some time ago (test case number 731).
|
| |
|
| |
|
|
|
|
|
|
| |
* Replace calls to rew_sub() with rew_last() - two less out of 18.
* No need to keep track of the body, it's always opened right after
the head and never used for anything in this function.
|
|
|
|
|
|
|
|
|
|
| |
and elements under any and all circumstances, even handling some
bad block nesting now and then. Little surprisingly, this ends up
in excessive complexity and has caused many bugs in the past.
Start to slowly disentangle this mess by replacing calls to rew_sub()
immediately following mdoc_head_alloc() by the much simpler rew_last().
Gets rid of the first two rew_sub() calls out of twenty.
No functional change.
|