| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
patch from bentley@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-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@.
|
|
|
|
|
| |
a pointer to the end of the parsed data, making it easier to
parse subsequent bytes
|
|
|
|
|
| |
the next line is a text line starting with whitespace.
Quirk found in the sysutils/rancid port.
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
used by both the mdoc and man formatters, with the ultimate
goal of reducing code duplication between the two macro formatters.
Made possible by the parser unification.
Add the first formatting function (for the .br request).
|
|
|
|
|
| |
Generate the first node on the roff level: .br
Fix some column numbers in diagnostic messages while here.
|
|
|
|
|
|
|
|
| |
* 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[].
|
|
|
|
|
|
| |
For .Sh, .Ss, .SH, .SS, only write selflink if an id could be constructed.
Crash reported by Raf Czlonka <rczlonka at gmail dot com>,
analysis of root cause by natano@
|
|
|
|
|
| |
As the man(7) language does not provide semantic markup,
only .SH, .SS, and .UR become anchors for now.
|
|
|
|
|
|
|
|
| |
The <col> element can only appear inside <colgroup>, so use <colgroup>.
The <tbody> element is optional and useless, so don't use it.
Even if we would ever need <thead> or <tfoot>, <tbody> would still be
optional and useless; besides, we will likely never need <thead> or <tfoot>,
simply because our languages don't support such functionality.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Basically, open <pre> whenever printing text in no-fill mode and it is
not already open, and close it whenever printing something that cannot
be inside <pre>.
This fixes a crash reported by Michael <Stapelberg at debian dot org>
in the French Linux chroot(2) manual and also improves rendering
for OpenBSD pages like DPMSGetTimeouts(3) and GLwDrawingArea(3).
These changes also permitted retiring struct mhtml.
|
|
|
|
| |
no functional change
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
with "literal", by the way, it means "no fill"):
* Use <pre> such that whitespace is preserved.
* Preserve lines breaks.
* For font alternating macros, avoid node recursion which required
scary juggling with the fill state. Instead, simply print the text
children directly.
Missing feature first noticed by kristaps@ in 2011,
the again reported by afresh1@ in 2016,
and finally reported here: https://github.com/Debian/debiman/issues/21 ,
which i only found because of Shane Kerr's comment here:
https://plus.google.com/110314300533310775053/posts/H1eaw9Yskoc
|
| |
|
|
|
|
| |
Correct markup for .Va and iprove markup for .Dv, .Er, .Ev while here.
|
|
|
|
| |
Start using real macro names for CSS classes.
|
|
|
|
| |
and CSS rules on the <html> and <body> levels.
|
|
|
|
|
|
|
|
|
| |
in filled text. This does not affect HTML semantics, but makes the
HTML code even more humanly readable.
While here,
- collapse multiple consecutive space characters in filled text
- and insert a blank between style entries.
|
|
|
|
|
| |
around tags and by introducing some simple indentation.
No change of HTML semantics intended.
|
|
|
|
|
|
|
|
|
| |
interfaces. Such a static buffer was a bad idea in the first place,
causing unfixable truncation that was only prevented by triggering
an assertion failure. Instead, let the small number of remaining
users allocate and free their own, temporary dynamic buffers,
or for the case of .Xr and .In, pass the original data to be
assembled in print_otag().
|
|
|
|
|
|
|
|
|
|
| |
number of arguments.
Delete struct htmlpair and all the PAIR_*() macros.
Delete enum htmlattr, handle that in print_otag() instead.
Minus 190 lines of code; no functional change except better ordering
of attributes (class before style) in three cases.
|
| |
|
|
|
|
|
|
|
|
| |
most uses by one, a few by two pointer checks, and only one by a
tiny loop - not only making data smaller, but code shorter as well.
This gets rid of an implicit invariant that confused both static
analysis tools and human auditors. No functional change.
|
| |
|
| |
|
|
|
|
|
|
| |
man_node() from the mandoc(3) semi-public interface and the internal
wrapper functions print_mdoc() and print_man() from the HTML formatters.
Minus 60 lines of code, no functional change.
|
|
|
|
|
| |
Almost completely mechanical, no functional change.
Written on the train from Exeter to London returning from p2k15.
|
|
|
|
|
| |
Replace struct mdoc_meta and struct man_meta by a unified struct roff_meta.
Written of the train from London to Exeter on the way to p2k15.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
in front of it. Issue found by tedu@ in glOrtho(3).
There are also cases of excessive whitespace before and after
equations. This patch neither fixes them nor makes them worse.
|
|
|
|
| |
from Svyatoslav Mishyn <juef at openmailboxd dot org>, Crux Linux
|
|
|
|
|
| |
Replace tail recursion by iteration when walking the syntax trees.
No functional change.
|
|
|
|
|
| |
parser. Simplify the code by moving it into the roff(7) parser, also
making it work for mdoc(7).
|
|
|
|
|
| |
- .sp with an invalid argument is .sp 1v, not .sp 0v
- in man(1), trailing garbage doesn't make scaling units invalid
|
|
|
|
|
| |
in particular .sp which uses "v", when the scale is not specified;
cures groff-mandoc differences in about a dozen Xenocara manuals
|
|
|
|
|
| |
In particular, make it work in no-fill mode, too.
Reminded by Carsten dot Kunze at arcor dot de (Heirloom roff).
|
|
|
|
|
|
| |
* add missing forward declarations
* remove needless header inclusions
* some style unification
|
| |
|
|
|
|
|
|
|
| |
This is good because <p> is brittle: it can't appear within other block
macros.
This fixes a regression of the original HTML5 patch as noted by schwarze@
on the tech@ list, 14/8/2014.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This uses a <style /> block right before the <link /> for the stylesheet.
Use this to kick out hardcoded header and footer table widths.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Write double constants as double rather than integer literals.
Remove useless explicit (double) cast done at one place and nowhere else.
No functional change.
|