-/* $Id: man_validate.c,v 1.92 2014/06/20 17:24:00 schwarze Exp $ */
+/* $Id: man_validate.c,v 1.93 2014/06/20 23:02:31 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
man->flags &= ~MAN_BLINE;
man->flags &= ~MAN_ELINE;
- if (NULL == man->first->child) {
- man_nmsg(man, n, MANDOCERR_NODOCBODY);
- return(0);
- } else if (NULL == man->meta.title) {
+ if (NULL == man->first->child)
+ man_nmsg(man, n, MANDOCERR_DOC_EMPTY);
+ else
+ man->meta.hasbody = 1;
+
+ if (NULL == man->meta.title) {
man_nmsg(man, n, MANDOCERR_TH_MISSING);
/*