From fec2846b7ca7a77a0e070300000259ce931ab0d0 Mon Sep 17 00:00:00 2001 From: schwarze Date: Thu, 22 Oct 2015 22:05:42 +0000 Subject: [PATCH] use the new function man_validate() here, too --- usr.bin/mandoc/Makefile | 4 ++-- usr.bin/mandoc/cgi.c | 7 +++++-- usr.bin/mandoc/mandocdb.c | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/usr.bin/mandoc/Makefile b/usr.bin/mandoc/Makefile index 021fe34dd69..896e2fc71ca 100644 --- a/usr.bin/mandoc/Makefile +++ b/usr.bin/mandoc/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.99 2015/10/20 02:00:49 schwarze Exp $ +# $OpenBSD: Makefile,v 1.100 2015/10/22 22:05:42 schwarze Exp $ .include @@ -53,7 +53,7 @@ CGI_OBJS = ${LIBMANDOC_OBJS} ${HTML_OBJS} \ mansearch.o mansearch_const.o cgi.o cgi.o: cgi.h main.h manconf.h mandoc.h mandoc_aux.h mansearch.h \ - mdoc.h roff.h + man.h mdoc.h roff.h man.cgi: ${CGI_OBJS} ${CC} ${LDFLAGS} ${STATIC} -o ${.TARGET} ${CGI_OBJS} ${LDADD} diff --git a/usr.bin/mandoc/cgi.c b/usr.bin/mandoc/cgi.c index f1e65e160e1..d50d7391acb 100644 --- a/usr.bin/mandoc/cgi.c +++ b/usr.bin/mandoc/cgi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cgi.c,v 1.50 2015/10/20 02:00:49 schwarze Exp $ */ +/* $OpenBSD: cgi.c,v 1.51 2015/10/22 22:05:42 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2014, 2015 Ingo Schwarze @@ -32,6 +32,7 @@ #include "mandoc.h" #include "roff.h" #include "mdoc.h" +#include "man.h" #include "main.h" #include "manconf.h" #include "mansearch.h" @@ -858,8 +859,10 @@ format(const struct req *req, const char *file) if (man->macroset == MACROSET_MDOC) { mdoc_validate(man); html_mdoc(vp, man); - } else + } else { + man_validate(man); html_man(vp, man); + } html_free(vp); mparse_free(mp); diff --git a/usr.bin/mandoc/mandocdb.c b/usr.bin/mandoc/mandocdb.c index 4762811a66f..62f39383b19 100644 --- a/usr.bin/mandoc/mandocdb.c +++ b/usr.bin/mandoc/mandocdb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mandocdb.c,v 1.159 2015/10/20 02:00:49 schwarze Exp $ */ +/* $OpenBSD: mandocdb.c,v 1.160 2015/10/22 22:05:42 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011-2015 Ingo Schwarze @@ -1178,6 +1178,7 @@ mpages_merge(struct mparse *mp) mpage->arch == NULL ? "" : mpage->arch); mpage->title = mandoc_strdup(man->meta.title); } else if (man != NULL && man->macroset == MACROSET_MAN) { + man_validate(man); mpage->form = FORM_SRC; mpage->sec = mandoc_strdup(man->meta.msec); mpage->arch = mandoc_strdup(mlink->arch); -- 2.20.1