diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-12 15:50:42 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-12 15:50:42 +0000 |
commit | 2dcec7ae5910c79dff9f5cea75f2569848bc2d0a (patch) | |
tree | 759204d049d6ee99a285f88c494047c729f6caae | |
parent | f820b77f059cd8365c50c5ddde78c343b541d4b3 (diff) | |
download | mandoc-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-- | TODO | 4 | ||||
-rw-r--r-- | main.c | 1 | ||||
-rw-r--r-- | man_validate.c | 2 | ||||
-rw-r--r-- | mandoc.h | 1 |
4 files changed, 3 insertions, 5 deletions
@@ -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 @@ -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); @@ -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 */ |