diff options
Diffstat (limited to 'cgi.c')
-rw-r--r-- | cgi.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: cgi.c,v 1.99 2014/10/07 18:20:06 schwarze Exp $ */ +/* $Id: cgi.c,v 1.100 2014/10/28 17:36:19 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014 Ingo Schwarze <schwarze@usta.de> @@ -824,6 +824,7 @@ static void format(const struct req *req, const char *file) { struct mparse *mp; + struct mchars *mchars; struct mdoc *mdoc; struct man *man; void *vp; @@ -837,8 +838,9 @@ format(const struct req *req, const char *file) return; } + mchars = mchars_alloc(); mp = mparse_alloc(MPARSE_SO, MANDOCLEVEL_FATAL, NULL, - req->q.manpath); + mchars, req->q.manpath); rc = mparse_readfd(mp, fd, file); close(fd); @@ -864,10 +866,11 @@ format(const struct req *req, const char *file) req->q.manpath, file); pg_error_internal(); mparse_free(mp); + mchars_free(mchars); return; } - vp = html_alloc(opts); + vp = html_alloc(mchars, opts); if (NULL != mdoc) html_mdoc(vp, mdoc); @@ -876,6 +879,7 @@ format(const struct req *req, const char *file) html_free(vp); mparse_free(mp); + mchars_free(mchars); free(opts); } |