summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2009-07-13 00:33:41 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2009-07-13 00:33:41 +0000
commit740b8663591699e206e2d4f97dbe285259deed3e (patch)
tree7fbc05dabcaffbb150e6303ee3d8346f397841a7 /usr.bin
parentd69047d90aaf9e86abc0fbe9d7f0b23b0c35a713 (diff)
sync to 1.7.24: mdoc_nwarn/mdoc_nerr got mixed up;
fix from joerg at netbsd via kristaps@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/mandoc/libmdoc.h6
-rw-r--r--usr.bin/mandoc/mdoc_validate.c8
2 files changed, 8 insertions, 6 deletions
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 <kristaps@kth.se>
*
@@ -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 <kristaps@kth.se>
*
@@ -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