=================================================================== RCS file: /cvs/mandoc/cgi.c,v retrieving revision 1.107 retrieving revision 1.108 diff -u -p -r1.107 -r1.108 --- mandoc/cgi.c 2015/04/18 16:06:39 1.107 +++ mandoc/cgi.c 2015/04/18 16:34:25 1.108 @@ -1,4 +1,4 @@ -/* $Id: cgi.c,v 1.107 2015/04/18 16:06:39 schwarze Exp $ */ +/* $Id: cgi.c,v 1.108 2015/04/18 16:34:25 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2014, 2015 Ingo Schwarze @@ -30,8 +30,9 @@ #include #include -#include "mandoc.h" #include "mandoc_aux.h" +#include "mandoc.h" +#include "roff.h" #include "main.h" #include "manconf.h" #include "mansearch.h" @@ -819,7 +820,6 @@ format(const struct req *req, const char *file) struct manoutput conf; struct mparse *mp; struct mchars *mchars; - struct roff_man *mdoc; struct roff_man *man; void *vp; int fd; @@ -846,8 +846,8 @@ format(const struct req *req, const char *file) usepath ? "&manpath=" : "", usepath ? req->q.manpath : ""); - mparse_result(mp, &mdoc, &man, NULL); - if (NULL == man && NULL == mdoc) { + mparse_result(mp, &man, NULL); + if (man == NULL) { fprintf(stderr, "fatal mandoc error: %s/%s\n", req->q.manpath, file); pg_error_internal(); @@ -858,8 +858,8 @@ format(const struct req *req, const char *file) vp = html_alloc(mchars, &conf); - if (NULL != mdoc) - html_mdoc(vp, mdoc); + if (man->macroset == MACROSET_MDOC) + html_mdoc(vp, man); else html_man(vp, man);