diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-08-06 15:09:05 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-08-06 15:09:05 +0000 |
commit | 24b160c265af79f44e54160d97249622ff07747a (patch) | |
tree | 6bab11dc37008079265c87f0b7d5ee5ad38955f6 /mandocdb.c | |
parent | 4e6374f6dccb1f26d1d9efc07a9ce9c9c600c3e7 (diff) | |
download | mandoc-24b160c265af79f44e54160d97249622ff07747a.tar.gz |
Bring the handling of defective prologues even closer to groff,
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.
Diffstat (limited to 'mandocdb.c')
-rw-r--r-- | mandocdb.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1198,8 +1198,9 @@ mpages_merge(struct mchars *mc, struct mparse *mp) goto nextpage; } else if (NULL != mdoc) { mpage->form = FORM_SRC; - mpage->sec = - mandoc_strdup(mdoc_meta(mdoc)->msec); + mpage->sec = mdoc_meta(mdoc)->msec; + mpage->sec = mandoc_strdup( + NULL == mpage->sec ? "" : mpage->sec); mpage->arch = mdoc_meta(mdoc)->arch; mpage->arch = mandoc_strdup( NULL == mpage->arch ? "" : mpage->arch); |