=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/cgi.c,v retrieving revision 1.46 retrieving revision 1.47 diff -c -r1.46 -r1.47 *** src/usr.bin/mandoc/cgi.c 2015/04/18 16:04:40 1.46 --- src/usr.bin/mandoc/cgi.c 2015/04/18 16:34:03 1.47 *************** *** 1,4 **** ! /* $OpenBSD: cgi.c,v 1.46 2015/04/18 16:04:40 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2014, 2015 Ingo Schwarze --- 1,4 ---- ! /* $OpenBSD: cgi.c,v 1.47 2015/04/18 16:34:03 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2014, 2015 Ingo Schwarze *************** *** 28,35 **** #include #include - #include "mandoc.h" #include "mandoc_aux.h" #include "main.h" #include "manconf.h" #include "mansearch.h" --- 28,36 ---- #include #include #include "mandoc_aux.h" + #include "mandoc.h" + #include "roff.h" #include "main.h" #include "manconf.h" #include "mansearch.h" *************** *** 817,823 **** struct manoutput conf; struct mparse *mp; struct mchars *mchars; - struct roff_man *mdoc; struct roff_man *man; void *vp; int fd; --- 818,823 ---- *************** *** 844,851 **** usepath ? "&manpath=" : "", usepath ? req->q.manpath : ""); ! mparse_result(mp, &mdoc, &man, NULL); ! if (NULL == man && NULL == mdoc) { fprintf(stderr, "fatal mandoc error: %s/%s\n", req->q.manpath, file); pg_error_internal(); --- 844,851 ---- usepath ? "&manpath=" : "", usepath ? req->q.manpath : ""); ! mparse_result(mp, &man, NULL); ! if (man == NULL) { fprintf(stderr, "fatal mandoc error: %s/%s\n", req->q.manpath, file); pg_error_internal(); *************** *** 856,863 **** vp = html_alloc(mchars, &conf); ! if (NULL != mdoc) ! html_mdoc(vp, mdoc); else html_man(vp, man); --- 856,863 ---- vp = html_alloc(mchars, &conf); ! if (man->macroset == MACROSET_MDOC) ! html_mdoc(vp, man); else html_man(vp, man);