summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-07-12 09:13:21 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-07-12 09:13:21 +0000
commitde9d726f42e5bca85bab714aa92b7c960af11d8d (patch)
treec21931f1f383e3b9b1755581fbeb074079ba4a87
parent4e77eec7877b4596d834d751802818b28cf9ebc0 (diff)
downloadmandoc-de9d726f42e5bca85bab714aa92b7c960af11d8d.tar.gz
Fixed mdoc_nwarn/mdoc_nerr considering themselves err/warn instead of warn/err (BIG mistake). From suggestion by <joerg@netbsd.org>.
-rw-r--r--libmdoc.h4
-rw-r--r--mdoc_validate.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/libmdoc.h b/libmdoc.h
index 179fcf88..b3e2083b 100644
--- a/libmdoc.h
+++ b/libmdoc.h
@@ -123,9 +123,9 @@ __BEGIN_DECLS
#define mdoc_pwarn(m, l, p, t) \
mdoc_err((m), (l), (p), 0, (t))
#define mdoc_nerr(m, n, t) \
- mdoc_err((m), (n)->line, (n)->pos, 0, (t))
-#define mdoc_nwarn(m, n, t) \
mdoc_err((m), (n)->line, (n)->pos, 1, (t))
+#define mdoc_nwarn(m, n, t) \
+ mdoc_err((m), (n)->line, (n)->pos, 0, (t))
int mdoc_err(struct mdoc *, int, int, int, enum merr);
int mdoc_verr(struct mdoc *, int, int, const char *, ...);
diff --git a/mdoc_validate.c b/mdoc_validate.c
index 8afba182..a55d8e4f 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -1217,9 +1217,11 @@ post_sh_head(POST_ARGS)
if (SEC_CUSTOM == sec)
return(1);
if (sec == mdoc->lastnamed)
- return(mdoc_nwarn(mdoc, mdoc->last, ESECREP));
+ if ( ! mdoc_nwarn(mdoc, mdoc->last, ESECREP))
+ return(0);
if (sec < mdoc->lastnamed)
- return(mdoc_nwarn(mdoc, mdoc->last, ESECOOO));
+ if ( ! mdoc_nwarn(mdoc, mdoc->last, ESECOOO))
+ return(0);
/*
* Check particular section/manual conventions. LIBRARY can