From 740b8663591699e206e2d4f97dbe285259deed3e Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 13 Jul 2009 00:33:41 +0000 Subject: sync to 1.7.24: mdoc_nwarn/mdoc_nerr got mixed up; fix from joerg at netbsd via kristaps@ --- usr.bin/mandoc/libmdoc.h | 6 +++--- usr.bin/mandoc/mdoc_validate.c | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/mandoc/libmdoc.h b/usr.bin/mandoc/libmdoc.h index 5ca3f05074f..f81c2aa9aa0 100644 --- a/usr.bin/mandoc/libmdoc.h +++ b/usr.bin/mandoc/libmdoc.h @@ -1,4 +1,4 @@ -/* $Id: libmdoc.h,v 1.13 2009/07/12 22:35:08 schwarze Exp $ */ +/* $Id: libmdoc.h,v 1.14 2009/07/13 00:33:40 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -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/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c index 8a410e8fe39..7bd8321ed8b 100644 --- a/usr.bin/mandoc/mdoc_validate.c +++ b/usr.bin/mandoc/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.22 2009/07/12 23:19:48 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.23 2009/07/13 00:33:40 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -1212,9 +1212,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 -- cgit v1.2.3