aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-08-06 15:09:05 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-08-06 15:09:05 +0000
commitd1c93a587dfb54f669ffb05890dab4d523cc57dc (patch)
treee8862f17d03e32664ba10cc8d9aa4b682bbeff64 /mandoc.h
parent5f1748e981fcd266c4bc34941a57e258388e7c69 (diff)
downloadmandoc-d1c93a587dfb54f669ffb05890dab4d523cc57dc.tar.gz
mandoc-d1c93a587dfb54f669ffb05890dab4d523cc57dc.tar.zst
mandoc-d1c93a587dfb54f669ffb05890dab4d523cc57dc.zip
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 'mandoc.h')
-rw-r--r--mandoc.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/mandoc.h b/mandoc.h
index 2192fd2c..fd91314d 100644
--- a/mandoc.h
+++ b/mandoc.h
@@ -1,4 +1,4 @@
-/* $Id: mandoc.h,v 1.151 2014/08/01 17:27:44 schwarze Exp $ */
+/* $Id: mandoc.h,v 1.152 2014/08/06 15:09:05 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -49,16 +49,19 @@ enum mandocerr {
MANDOCERR_WARNING, /* ===== start of warnings ===== */
/* related to the prologue */
- MANDOCERR_TH_MISSING, /* missing .TH macro, using "unknown 1" */
+ MANDOCERR_DT_NOTITLE, /* missing manual title, using UNTITLED: line */
+ MANDOCERR_TH_NOTITLE, /* missing manual title, using "": [macro] */
MANDOCERR_TITLE_CASE, /* lower case character in document title */
+ MANDOCERR_MSEC_MISSING, /* missing manual section, using "": macro */
MANDOCERR_MSEC_BAD, /* unknown manual section: Dt ... section */
MANDOCERR_ARCH_BAD, /* unknown manual volume or arch: Dt ... volume */
MANDOCERR_DATE_MISSING, /* missing date, using today's date */
MANDOCERR_DATE_BAD, /* cannot parse date, using it verbatim: date */
- MANDOCERR_PROLOG_ORDER, /* prologue macros out of order: macro */
+ MANDOCERR_OS_MISSING, /* missing Os macro, using "" */
MANDOCERR_PROLOG_REP, /* duplicate prologue macro: macro */
- MANDOCERR_PROLOG_BAD, /* incomplete prologue, terminated by: macro */
- MANDOCERR_PROLOG_ONLY, /* skipping prologue macro in body: macro */
+ MANDOCERR_PROLOG_LATE, /* late prologue macro: macro */
+ MANDOCERR_DT_LATE, /* skipping late title macro: Dt args */
+ MANDOCERR_PROLOG_ORDER, /* prologue macros out of order: macros */
/* related to document structure */
MANDOCERR_SO, /* .so is fragile, better use ln(1): so path */