summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-10-22 22:06:43 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-10-22 22:06:43 +0000
commit70f6797983dbee0f8e271c9e7e706b473dcfb77c (patch)
treeba3717164d90348506bac182fa6fbf412db8937f
parent54ffa6b6bcb97f97cc0a3604078eb63aa8c759ef (diff)
downloadmandoc-70f6797983dbee0f8e271c9e7e706b473dcfb77c.tar.gz
use the new function man_validate() here, too
-rw-r--r--Makefile.depend2
-rw-r--r--cgi.c5
-rw-r--r--demandoc.c4
-rw-r--r--mandocdb.c1
4 files changed, 9 insertions, 3 deletions
diff --git a/Makefile.depend b/Makefile.depend
index 4cb1df3e..ed00dbb9 100644
--- a/Makefile.depend
+++ b/Makefile.depend
@@ -1,5 +1,5 @@
att.o: att.c config.h roff.h mdoc.h libmdoc.h
-cgi.o: cgi.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h main.h manconf.h mansearch.h cgi.h
+cgi.o: cgi.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h main.h manconf.h mansearch.h cgi.h
chars.o: chars.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h libmandoc.h
compat_err.o: compat_err.c config.h
compat_fgetln.o: compat_fgetln.c config.h
diff --git a/cgi.c b/cgi.c
index 4dc470c3..00c9dce6 100644
--- a/cgi.c
+++ b/cgi.c
@@ -34,6 +34,7 @@
#include "mandoc.h"
#include "roff.h"
#include "mdoc.h"
+#include "man.h"
#include "main.h"
#include "manconf.h"
#include "mansearch.h"
@@ -860,8 +861,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/demandoc.c b/demandoc.c
index cc07d2db..8e9044b2 100644
--- a/demandoc.c
+++ b/demandoc.c
@@ -122,8 +122,10 @@ pmandoc(struct mparse *mp, int fd, const char *fn, int list)
if (man->macroset == MACROSET_MDOC) {
mdoc_validate(man);
pmdoc(man->first->child, &line, &col, list);
- } else
+ } else {
+ man_validate(man);
pman(man->first->child, &line, &col, list);
+ }
if ( ! list)
putchar('\n');
diff --git a/mandocdb.c b/mandocdb.c
index ed4e890e..d296c8df 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1176,6 +1176,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);