From 70a9dbd1a5a305812354c332d729472bd2c06561 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 18 Apr 2015 16:34:25 +0000 Subject: Profit from the unified struct roff_man and reduce the number of arguments of mparse_result() by one. No functional change. Written on the ICE Bruxelles-Koeln on the way back from p2k15. --- cgi.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'cgi.c') 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 * 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); -- cgit v1.2.3