From 24b160c265af79f44e54160d97249622ff07747a Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 6 Aug 2014 15:09:05 +0000 Subject: 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. --- read.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'read.c') diff --git a/read.c b/read.c index 07329dbe..4ad08236 100644 --- a/read.c +++ b/read.c @@ -93,16 +93,19 @@ static const char * const mandocerrs[MANDOCERR_MAX] = { "generic warning", /* related to the prologue */ - "missing .TH macro, using \"unknown 1\"", + "missing manual title, using UNTITLED", + "missing manual title, using \"\"", "lower case character in document title", + "missing manual section, using \"\"", "unknown manual section", "unknown manual volume or arch", "missing date, using today's date", "cannot parse date, using it verbatim", - "prologue macros out of order", + "missing Os macro, using \"\"", "duplicate prologue macro", - "incomplete prologue, terminated by", - "skipping prologue macro in body", + "late prologue macro", + "skipping late title macro", + "prologue macros out of order", /* related to document structure */ ".so is fragile, better use ln(1)", -- cgit