version 1.99, 2014/10/07 18:20:06 |
version 1.101, 2014/11/11 19:04:55 |
|
|
format(const struct req *req, const char *file) |
format(const struct req *req, const char *file) |
{ |
{ |
struct mparse *mp; |
struct mparse *mp; |
|
struct mchars *mchars; |
struct mdoc *mdoc; |
struct mdoc *mdoc; |
struct man *man; |
struct man *man; |
void *vp; |
void *vp; |
Line 837 format(const struct req *req, const char *file) |
|
Line 838 format(const struct req *req, const char *file) |
|
return; |
return; |
} |
} |
|
|
|
mchars = mchars_alloc(); |
mp = mparse_alloc(MPARSE_SO, MANDOCLEVEL_FATAL, NULL, |
mp = mparse_alloc(MPARSE_SO, MANDOCLEVEL_FATAL, NULL, |
req->q.manpath); |
mchars, req->q.manpath); |
rc = mparse_readfd(mp, fd, file); |
rc = mparse_readfd(mp, fd, file); |
close(fd); |
close(fd); |
|
|
Line 864 format(const struct req *req, const char *file) |
|
Line 866 format(const struct req *req, const char *file) |
|
req->q.manpath, file); |
req->q.manpath, file); |
pg_error_internal(); |
pg_error_internal(); |
mparse_free(mp); |
mparse_free(mp); |
|
mchars_free(mchars); |
return; |
return; |
} |
} |
|
|
vp = html_alloc(opts); |
vp = html_alloc(mchars, opts); |
|
|
if (NULL != mdoc) |
if (NULL != mdoc) |
html_mdoc(vp, mdoc); |
html_mdoc(vp, mdoc); |
Line 876 format(const struct req *req, const char *file) |
|
Line 879 format(const struct req *req, const char *file) |
|
|
|
html_free(vp); |
html_free(vp); |
mparse_free(mp); |
mparse_free(mp); |
|
mchars_free(mchars); |
free(opts); |
free(opts); |
} |
} |
|
|
Line 973 pg_search(const struct req *req) |
|
Line 977 pg_search(const struct req *req) |
|
search.sec = req->q.sec; |
search.sec = req->q.sec; |
search.outkey = "Nd"; |
search.outkey = "Nd"; |
search.argmode = req->q.equal ? ARG_NAME : ARG_EXPR; |
search.argmode = req->q.equal ? ARG_NAME : ARG_EXPR; |
|
search.firstmatch = 1; |
|
|
paths.sz = 1; |
paths.sz = 1; |
paths.paths = mandoc_malloc(sizeof(char *)); |
paths.paths = mandoc_malloc(sizeof(char *)); |