aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2010-09-26 20:22:28 +0000
committerIngo Schwarze <schwarze@openbsd.org>2010-09-26 20:22:28 +0000
commit7dd5c61d801d065c98fea61d76ccc782ac3de66f (patch)
tree7b96fa142089f7613ac26ecc84f1f851d7ec3892 /mandoc.h
parentecabba142785ad106c05e2eea8414e57ed8b0376 (diff)
downloadmandoc-7dd5c61d801d065c98fea61d76ccc782ac3de66f.tar.gz
mandoc-7dd5c61d801d065c98fea61d76ccc782ac3de66f.tar.zst
mandoc-7dd5c61d801d065c98fea61d76ccc782ac3de66f.zip
If an explicit scope is still open at the end of an input file,
report an ERROR: We can still render the page by just closing the open scope, but it is likely that information will be missing or document structure mangled. Before, man(7) only reported a WARNING (which is dangerous because we cannot be sure rendering is correct) and mdoc(7) ran into FATAL (which is too drastic, there is no reason not to show what we have). "looks good" kristaps@
Diffstat (limited to 'mandoc.h')
-rw-r--r--mandoc.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/mandoc.h b/mandoc.h
index b314d886..ec603ace 100644
--- a/mandoc.h
+++ b/mandoc.h
@@ -1,4 +1,4 @@
-/* $Id: mandoc.h,v 1.18 2010/08/20 01:02:07 schwarze Exp $ */
+/* $Id: mandoc.h,v 1.19 2010/09/26 20:22:28 schwarze Exp $ */
/*
* Copyright (c) 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -63,7 +63,6 @@ enum mandocerr {
MANDOCERR_SECMSEC, /* section not in conventional manual section */
MANDOCERR_EOLNSPACE, /* end of line whitespace */
MANDOCERR_SCOPENEST, /* blocks badly nested */
- MANDOCERR_SCOPEEXIT, /* scope open on exit */
MANDOCERR_ERROR, /* ===== end of errors ===== */
@@ -89,6 +88,7 @@ enum mandocerr {
MANDOCERR_ARGCOUNT, /* argument count wrong */
MANDOCERR_NOSCOPE, /* no such block is open */
MANDOCERR_SCOPEREP, /* scope already open */
+ MANDOCERR_SCOPEEXIT, /* scope open on exit */
/* FIXME: merge following with MANDOCERR_ARGCOUNT */
MANDOCERR_NOARGS, /* macro requires line argument(s) */
MANDOCERR_NOBODY, /* macro requires body argument(s) */
@@ -108,7 +108,6 @@ enum mandocerr {
MANDOCERR_BADDISP, /* unsupported display type */
MANDOCERR_SCOPEFATAL, /* blocks badly nested */
MANDOCERR_SYNTNOSCOPE, /* no scope to rewind: syntax violated */
- MANDOCERR_SYNTSCOPE, /* scope broken, syntax violated */
MANDOCERR_SYNTLINESCOPE, /* line scope broken, syntax violated */
MANDOCERR_SYNTARGVCOUNT, /* argument count wrong, violates syntax */
MANDOCERR_SYNTCHILD, /* child violates parent syntax */