aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cgi.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgi.c')
-rw-r--r--cgi.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/cgi.c b/cgi.c
index e3136c9a..14ff5f8b 100644
--- a/cgi.c
+++ b/cgi.c
@@ -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 <kristaps@bsd.lv>
* Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@usta.de>
@@ -30,8 +30,9 @@
#include <string.h>
#include <unistd.h>
-#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);