summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-01-12 15:50:42 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-01-12 15:50:42 +0000
commit2dcec7ae5910c79dff9f5cea75f2569848bc2d0a (patch)
tree759204d049d6ee99a285f88c494047c729f6caae
parentf820b77f059cd8365c50c5ddde78c343b541d4b3 (diff)
downloadmandoc-2dcec7ae5910c79dff9f5cea75f2569848bc2d0a.tar.gz
Make out-of-context `fi' invocations not cause an error, but just a
warning. From a TODO by schwarze@, originally noted by Brad Smith.
-rw-r--r--TODO4
-rw-r--r--main.c1
-rw-r--r--man_validate.c2
-rw-r--r--mandoc.h1
4 files changed, 3 insertions, 5 deletions
diff --git a/TODO b/TODO
index 2ae6c154..aefc5e7d 100644
--- a/TODO
+++ b/TODO
@@ -172,10 +172,6 @@
* error reporting issues
************************************************************************
-- .fi without preceding .nf need not be an ERROR,
- a warning is sufficient; occurs in all postfix manuals
- reported by brad@ Sun, Jan 09, 2011 at 09:45:58PM -0500
-
- downgrade "ERROR: macro requires body argument(s)" to WARNING
for the typical man(7) cases, it keeps confusing people
reminded by brad@ Sun, Jan 09, 2011 at 09:45:58PM -0500
diff --git a/main.c b/main.c
index 87ba122b..9568e5da 100644
--- a/main.c
+++ b/main.c
@@ -158,6 +158,7 @@ static const char * const mandocerrs[MANDOCERR_MAX] = {
"list type must come first",
"tag lists require a width argument",
"missing font type",
+ "skipping end of block that is not open",
/* related to bad macro arguments */
"skipping argument",
diff --git a/man_validate.c b/man_validate.c
index 68584688..d4618355 100644
--- a/man_validate.c
+++ b/man_validate.c
@@ -489,7 +489,7 @@ post_fi(CHKARGS)
{
if ( ! (MAN_LITERAL & m->flags))
- man_nmsg(m, n, MANDOCERR_NOSCOPE);
+ man_nmsg(m, n, MANDOCERR_WNOSCOPE);
m->flags &= ~MAN_LITERAL;
return(1);
diff --git a/mandoc.h b/mandoc.h
index 04aa7cdf..61a1f5ad 100644
--- a/mandoc.h
+++ b/mandoc.h
@@ -80,6 +80,7 @@ enum mandocerr {
MANDOCERR_LISTFIRST, /* list type must come first */
MANDOCERR_NOWIDTHARG, /* tag lists require a width argument */
MANDOCERR_FONTTYPE, /* missing font type */
+ MANDOCERR_WNOSCOPE, /* skipping end of block that is not open */
/* related to bad macro arguments */
MANDOCERR_IGNARGV, /* skipping argument */