aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/main.c
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 /main.c
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 'main.c')
-rw-r--r--main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/main.c b/main.c
index f429ae00..f1d64062 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.105 2010/09/04 20:18:53 kristaps Exp $ */
+/* $Id: main.c,v 1.106 2010/09/26 20:22:28 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -139,7 +139,6 @@ static const char * const mandocerrs[MANDOCERR_MAX] = {
"section not in conventional manual section",
"end of line whitespace",
"blocks badly nested",
- "scope open on exit",
"generic error",
@@ -165,6 +164,7 @@ static const char * const mandocerrs[MANDOCERR_MAX] = {
"argument count wrong",
"request scope close w/none open",
"scope already open",
+ "scope open on exit",
"macro requires line argument(s)",
"macro requires body argument(s)",
"macro requires argument(s)",
@@ -182,7 +182,6 @@ static const char * const mandocerrs[MANDOCERR_MAX] = {
"unsupported display type",
"blocks badly nested",
"no such block is open",
- "scope broken, syntax violated",
"line scope broken, syntax violated",
"argument count wrong, violates syntax",
"child violates parent syntax",