| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
when the only child is .Mt, not when the preceding node is .An,
to improve robustness. Triggered by a question from Svyatoslav
Mishyn <juef at openmailbox dot org> (Crux Linux).
|
|
|
|
|
|
| |
Not exactly recommended for use, rather for groff compatibility.
While here, introduce similar SHRT_MAX limits as in man(7),
fixing a few cases of infinite output found by jsg@ with afl.
|
|
|
|
| |
minus twenty lines of code in spite of enhanced functionality
|
| |
|
|
|
|
|
| |
- .sp with an invalid argument is .sp 1v, not .sp 0v
- in man(1), trailing garbage doesn't make scaling units invalid
|
|
|
|
|
|
|
| |
* The first argument of .Pf is not parsed.
* Normal delimiter handling does not apply to the first argument of .Pf.
* Warn if nothing follows a prefix (inspired by groff_mdoc(7)).
* In that case, do not suppress spacing.
|
|
|
|
|
|
|
|
| |
1. Correctly parse stray .Ec without preceding .Eo,
avoiding an assertion violation found by jsg@ with afl.
2. Correctly parse .Ec arguments when breaking another block.
3. Correct spacing around closing delimiter when breaking another block.
4. Sync some related formatting control from -Tascii to -Thtml.
|
|
|
|
|
| |
and not trigger an assertion when there is more than one argument;
the latter found by jsg@ with afl.
|
|
|
|
| |
just like groff; minibug noticed by bentley@.
|
|
|
|
|
|
|
|
|
|
| |
* .No selects the default font; relevant e.g. in .Bf blocks
* no need to force empty .Li elements
* closing delimiters as leading macro arguments do not suppress space
* opening delimiters at the end of a macro line do not suppress space
* correctly handle delimiter spacing in -Tman
As a side effect, these fixes let mandoc warn about empty .No macros
as requested by bentley@.
|
|
|
|
| |
this is now possible because -Tps now handles backspace overstriking.
|
|
|
|
|
|
|
|
|
| |
1. Support specifying the .Bd and .Bl -offset as a macro default width;
while here, simplify the code handling the same for .Bl -width.
2. Correct handling of .Bl -offset arguments: unlike .Bd -offset, the
arguments "left", "indent", and "indent-two" have no special meaning.
3. Fix the scaling of string length -offset and -width arguments in -Thtml.
Triggered by an incomplete documentation patch from bentley@.
|
|
|
|
|
|
|
|
|
|
|
|
| |
just like a closing delimiter. This didn't work in groff-1.15,
but it now works in groff-1.22.
After being closed by delimiters, .Nm scopes do not reopen.
Do not suppress white space after .Fl if the next node is a text node
on the same input line; that can happen for middle delimiters.
Fixing an issue reported by jmc@.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
in particular relaxing the distinction between prologue and body
and further improving messages.
* The last .Dd wins and the last .Os wins, even in the body.
* The last .Dt before the first body macro wins.
* Missing title in .Dt defaults to UNTITLED. Warn about it.
* Missing section in .Dt does not default to 1. But warn about it.
* Do not warn multiple times about the same mdoc(7) prologue macro.
* Warn about missing .Os.
* Incomplete .TH defaults to empty strings. Warn about it.
|
|
|
|
|
|
|
|
|
|
| |
* let .Nm fall back to the empty string, not to UNKNOWN
* never let .Rv copy an argument from .Nm
* avoid spurious \fR after empty .Nm in -Tman
* correct handling of .Ex and .Rv in -Tman
* correct the wording of the output for .Rv without arguments
* use non-breaking spaces in .Ex and .Rv output where required
* split MANDOCERR_NONAME into a warning for .Ex and an error for .Nm
|
|
|
|
|
|
| |
* Downgrade ".Bf -emphasis Em" from FATAL to WARNING.
* Mention the macros, the arguments, and the fallbacks.
* Hierarchical naming.
|
|
|
|
|
| |
so let us do the same for compatibility. Using this feature is of
course not recommended except in manual page obfuscation contests.
|
|
|
|
|
| |
since this is hardly more complicated than explicitly ignoring them
as we did in the past. Of course, do not use them!
|
|
|
|
| |
and cast snprintf return value to (void) where they are
|
|
|
|
|
| |
remove trailing whitespace and blanks before tabs, improve some indenting;
no functional change
|
|
|
|
|
| |
somewhat similar to what mdoc_term.c already does for -Tascii.
OpenBSD rev. 1.58.
|
|
|
|
|
| |
Found by naddy@ in the textproc/enchant(1) port.
Of course, do not use this in new manuals.
|
|
|
|
|
|
|
| |
functions used for multiple languages (mdoc, man, roff), for example
mandoc_escape(), mandoc_getarg(), mandoc_eos(), and generic auxiliary
functions. Split the auxiliaries out into their own file and header.
While here, do some #include cleanup.
|
|
|
|
|
|
|
| |
documented in the Ossanna-Kernighan-Ritter troff manual
and also supported by groff.
Missing feature reported by Steffen Nurpmeso <sdaoden at gmail dot com>.
|
| |
|
|
|
|
|
| |
Following an idea from Franco Fichtner, but implemented more cleanly.
This reduces groff-mandoc-differences in OpenBSD base by a fantastic 7.5%.
|
| |
|
|
|
|
|
|
| |
but only within .Nm blocks. Simplify the code accordingly.
Triggered by research done by Franco Fichtner.
|
|
|
|
|
| |
from Antonio Huete Jimenez <tuxillo at quantumachine dot net>
via Franco Fichtner (both DragonFly).
|
|
|
|
|
| |
This fixes horizontal spacing when an Ns macro follows a block-closing
macro and the corresponding block-opening macro is not on the same line.
|
|
|
|
|
|
|
| |
sequences such that output modes like -Tutf8 have a chance to select
nice glyphs. This doesn't change anything for -Tascii, and, for now,
it doesn't affect -Tps and -Tpdf either.
OK matthew@ bentley@; like the idea tedu@; no opinion jmc@.
|
|
|
|
| |
Found and fixed on the plane to the OpenBSD t2k13 hackathon in Toronto.
|
|
|
|
|
| |
Issue found when Thomas Klausner <wiz at NetBSD dot org> made me
look at the manuals of his http://www.nih.at/libzip library.
|
|
|
|
|
|
|
| |
takes care of printing the whole line. This reduces code duplication -
in particular after the upcoming commit to repair .Bl -offset -
and makes print_offs() more similar to what print_width() does.
No functional change.
|
|
|
|
|
|
|
|
|
|
|
|
| |
to fix multiple issues reported by Todd Miller; thanks!
Specifically,
- avoid double indentation after .Bd inside .Bl
- set up correct indentation after .Bl inside .Bl
- set up correct indentation after .Dl and .D1 inside .Bl
While here, also
- set up correct indentation *inside* .Dl and .D1 inside .Bl.
|
|
|
|
|
|
|
|
|
| |
just like in -Tascii mode; requested by millert@.
While here, do not escape the blank characters terminating man(7)
macros; this is becoming more important as we use more keeps now.
Note that -Tman still does not support .nr nS.
|
|
|
|
|
|
|
|
|
|
|
| |
* Use "\\ " not "\\~" as the non-breaking space as historic nroff
doesn't support the latter.
* The '-' before the flags needs to be quoted to prevent nroff
from putting a line break between the '-' and the flag character.
* Disable hyphenation and, for nroff, disable justification which is
consistent with how mdoc behaves (and produces more readable manuals).
(OpenBSD rev. 1.39, 1.40 and 1.41)
|
|
|
|
|
|
|
| |
instead of .sp -1v, which for example Solaris nroff handles poorly.
Problem report and patch by millert@,
with the print_word chunk tweaked by me.
|
|
|
|
|
|
|
| |
Inspired by a diff from millert@, but implemented rather
differently and with slightly better functionality.
In particular, this one respects -offset and -width
arguments found in the input file.
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Synching to OpenBSD rev. 1.38.
|
|
|
|
|
|
|
|
|
|
| |
* So far, .Pp and .Lp were removed before paragraph type blocks.
* Now also remove .br before paragraph type blocks.
* Treat .Lp as a paragraph like .Pp, so remove .Pp, .Lp, .br before it.
* Do not treat .sp as a paragraph, don't remove anything before it.
* After .Sh, .Ss, .Pp, and .Lp, remove .Pp, .Lp, .sp, .br, and blank lines.
* After .sp and .br, remove .br.
OpenBSD rev. mdoc.c 1.89 and mdoc_validate.c 1.106
|
|
|
|
|
| |
of the first list in a section, not before every item of the first list.
OpenBSD rev. 1.37
|
|
|
|
|
| |
There are still lots of ugly line breaks, to be fixed later.
OpenBSD rev. 1.36
|
|
|
|
|
|
|
|
|
| |
body of the item, mdoc(7) breaks the line, whereas the .TP used to
translate this to man(7) does not. Thus, insert an explicit roff(7)
line break in this place.
To be able to correctly count the characters, do not pass font escapes
an the like through print_word().
OpenBSD rev. 1.35
|
|
|
|
|
|
| |
In -mdoc -Tman, improve the framework to control vertical spacing.
Use both to support .Bl -compact (surprisingly hard to get right).
OpenBSD rev. 1.85 and 1.34, respectively.
|
|
|
|
|
|
|
| |
* .Fn with exactly one argument
* .Bl -hang without a -width
Now all 3776 OpenBSD base manuals build without crashing.
OpenBSD rev. 1.33
|
|
|
|
|
| |
All mdoc(7) macros are now supported by -Tman.
OpenBSD rev. 1.32
|
| |
|