-/* $Id: libmdoc.h,v 1.14 2009/07/07 09:29:15 kristaps Exp $ */
+/* $Id: libmdoc.h,v 1.15 2009/07/12 09:13:21 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
#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 *, ...);
-/* $Id: mdoc_validate.c,v 1.25 2009/07/07 11:47:17 kristaps Exp $ */
+/* $Id: mdoc_validate.c,v 1.26 2009/07/12 09:13:21 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
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