=================================================================== RCS file: /cvs/mandoc/cgi.c,v retrieving revision 1.99 retrieving revision 1.100 diff -u -p -r1.99 -r1.100 --- mandoc/cgi.c 2014/10/07 18:20:06 1.99 +++ mandoc/cgi.c 2014/10/28 17:36:19 1.100 @@ -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 * Copyright (c) 2014 Ingo Schwarze @@ -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); }