version 1.46, 2015/04/18 16:04:40 |
version 1.47, 2015/04/18 16:34:03 |
|
|
#include <string.h> |
#include <string.h> |
#include <unistd.h> |
#include <unistd.h> |
|
|
#include "mandoc.h" |
|
#include "mandoc_aux.h" |
#include "mandoc_aux.h" |
|
#include "mandoc.h" |
|
#include "roff.h" |
#include "main.h" |
#include "main.h" |
#include "manconf.h" |
#include "manconf.h" |
#include "mansearch.h" |
#include "mansearch.h" |
|
|
struct manoutput conf; |
struct manoutput conf; |
struct mparse *mp; |
struct mparse *mp; |
struct mchars *mchars; |
struct mchars *mchars; |
struct roff_man *mdoc; |
|
struct roff_man *man; |
struct roff_man *man; |
void *vp; |
void *vp; |
int fd; |
int fd; |
|
|
usepath ? "&manpath=" : "", |
usepath ? "&manpath=" : "", |
usepath ? req->q.manpath : ""); |
usepath ? req->q.manpath : ""); |
|
|
mparse_result(mp, &mdoc, &man, NULL); |
mparse_result(mp, &man, NULL); |
if (NULL == man && NULL == mdoc) { |
if (man == NULL) { |
fprintf(stderr, "fatal mandoc error: %s/%s\n", |
fprintf(stderr, "fatal mandoc error: %s/%s\n", |
req->q.manpath, file); |
req->q.manpath, file); |
pg_error_internal(); |
pg_error_internal(); |
|
|
|
|
vp = html_alloc(mchars, &conf); |
vp = html_alloc(mchars, &conf); |
|
|
if (NULL != mdoc) |
if (man->macroset == MACROSET_MDOC) |
html_mdoc(vp, mdoc); |
html_mdoc(vp, man); |
else |
else |
html_man(vp, man); |
html_man(vp, man); |
|
|