version 1.106, 2015/03/27 21:33:20 |
version 1.108, 2015/04/18 16:34:25 |
|
|
#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" |
Line 819 format(const struct req *req, const char *file) |
|
Line 820 format(const struct req *req, const char *file) |
|
struct manoutput conf; |
struct manoutput conf; |
struct mparse *mp; |
struct mparse *mp; |
struct mchars *mchars; |
struct mchars *mchars; |
struct mdoc *mdoc; |
struct roff_man *man; |
struct man *man; |
|
void *vp; |
void *vp; |
int fd; |
int fd; |
int usepath; |
int usepath; |
Line 846 format(const struct req *req, const char *file) |
|
Line 846 format(const struct req *req, const char *file) |
|
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(); |
Line 858 format(const struct req *req, const char *file) |
|
Line 858 format(const struct req *req, const char *file) |
|
|
|
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); |
|
|