| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Suggested by Thomas Klausner <wiz at NetBSD>; discussed with jmc@.
|
|
|
|
|
|
| |
we leak memory internally used by zlib to keep compression state.
Bug reported by Wolfgang Mueller <vehk at vehk dot de> who also
provided an incomplete patch, part of which i'm using in this commit.
|
|
|
|
| |
from jca@, ok jmc@
|
|
|
|
| |
return failure such that we can continue with the next file.
|
|
|
|
|
|
|
|
|
|
|
|
| |
right from roff_parseln() rather than delegating to read.c,
similar to what i just did for eqn(7).
The interface function roff_span() becomes obsolete and is deleted,
the former interface function roff_addtbl() becomes static,
the interface functions tbl_read() and tbl_cdata() become void,
and minus twelve linus of code.
No functional change.
|
|
|
|
|
|
| |
of struct roff_node which is allocated for each equation anyway.
2. Do not keep a list of equation parsers, one parser is enough.
Minus fifty lines of code, no functional change.
|
|
|
|
|
|
| |
that are not syntax mistakes and that do not cause wrong formatting
or content to style suggestions.
Also upgrade two warnings that may cause information loss to errors.
|
|
|
|
|
| |
is confusing, simply print "STYLE:", which is intuitive and does not
sound excessively alarming; suggested by jmc@, OK tedu@ jmc@.
|
|
|
|
| |
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)
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
| |
inspired by mdoclint(1), and jmc@ considers it useful
|
| |
|
| |
|
|
|
|
|
| |
of input lines without filling).
Contrary to groff, high-level macros abort .ce mode for now.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(escape character control), touching nothing after the preprocessing
stage and keeping even the state variable local to the preprocessor.
Since the escape character is also used for line continuation, this
requires pulling the implementation of line continuation from the
input reader to the preprocessor, which also considerably shortens
the code required for that.
When the escape character is changed, simply let the preprocessor
replace bare by escaped backslashes and instances of the non-standard
escape character with bare backslashes - that's all we need.
Oh, and if anybody dares to use these requests in OpenBSD manuals,
sending a medium-sized pack of axe-murderers after them might be a
worthwhile part of the punishment, but probably insuffient on its own.
|
|
|
|
| |
strange groff edge case behaviour found in multimedia/mjpegtools
|
| |
|
| |
|
|
|
|
| |
not a WARNING because they don't endanger portability
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Switch -W all from meaning -W warning to meaning -W style.
The meaning of -T lint does *not* change, it still implies -W warning.
No messages on the new level yet, but they will come.
Usually, i do not lightly make the user interface larger.
But this has been planned for years, and EXIT STATUS 1
was reserved for it all the time. The message system
is now stable enough to finally implement it.
jmc@ regarding the concept: "really good idea"
|
|
|
|
| |
no functional change, minus two source files, minus 200 lines of code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
limit, usually due to infinite recursion, discard whatever remains
in all those open stack levels. Otherwise, insane constructions
like the following could generate macros of enormous size, causing
mandoc(1) to die from memory exhaustion:
.de m \" original macro definition
.m \" recursion to blow up the stack
.de m \" definition to be run during the call of .m marked (*)
very long plain text (some kilobytes)
.m \" expand the above a thousand times while unwinding the stack
.. \" end of the original definition
.m \" (*) recursively generate a ridiculously large macro
.. \" end of recursively generated definition
.m \" execute the giant macro, exhausting memory
Very creative abuse found by tb@ with afl(1).
|
|
|
|
|
| |
Warn if that macro occurs elsewhere.
Triggered by a question from Dag-Erling Smoergrav <des @ FreeBSD>.
|
|
|
|
|
| |
* we include <sys/types.h> for size_t, so we don't need <stdint.h>
* sort declarations in read_whole_file()
|
|
|
|
|
|
|
| |
We always have a roff parser, so mparse_free() does not need to check
for existence before freeing it.
Also arrange code in struct mparse, mparse_reset(), and mparse_free()
in the same order for readability.
|
|
|
|
|
|
|
|
|
| |
without using mparse_open(3) to open the files, and if one of the
files includes a gzip'ed file with .so, then the gzip flag remains
set and the next main file will be expected to be gzip'ed.
Fix this by clearing the gzip flag in mparse_reset(3).
Bug found and patch provided by Michael <Stapelberg at debian dot org>.
|
|
|
|
|
|
|
|
|
| |
This does not attempt to pinpoint each and every offender, but
instead tries very hard to avoid false positives: Currently, there
are only two false positives in the whole OpenBSD base system.
Only do this in mdoc(7), not in man(7), because manuals written
in man(7) typically have much worse problems than this.
OK jmc@ on a previous version of the patch
|
|
|
|
|
|
| |
or during man_validate() have to affect the mandoc(1) EXIT STATUS.
Many thanks to <Yuri dot Pankov at gmail dot com> (illumos developer)
for reporting this regression.
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
| |
roff(7) comments, let the column number in the message point to the
end of the line rather than to the beginning of the comment.
Improvement suggested by bluhm@.
|
|
|
|
| |
missing feature noticed by jmc@
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
Stop supporting systems that don't have mmap(3).
Drop the obsolete names_check() now that we deleted MLINKS.
|
|
|
|
|
|
| |
in mparse_alloc(), so delete all the curp->man == NULL checks.
Triggered by a patch from Christos Zoulas suggesting to add
yet another such check.
|
|
|
|
|
| |
from working in the absence of a mandoc.db(5) database.
Found the hard way by Svyatoslav Mishyn on Crux Linux.
|
|
|
|
|
|
| |
Just return the file descriptor or -1 on error;
there is just one kind of error anyway.
Suggested by Christos Zoulas (NetBSD).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
closed the file descriptor passed to it after completing its work,
in particular considering the fact that it required its callers
to call open(2) or mparse_open() beforehand.
Change mparse_readfd() to not call close(2) and change the callers
to call close(2) afterwards, more or less bringing open and close
to the same level of the code and making review easier. Note that
man.cgi(8) already did that, even though it was wrong in the past.
Small restructuring suggested by Christos Zoulas (NetBSD).
|
|
|
|
|
| |
In that case, the required prototypes are in "config.h".
Patch from Peter Bray <pdb_ml at yahoo dot com dot au>.
|