version 1.102, 2014/11/26 17:55:27 |
version 1.103, 2015/01/15 04:26:39 |
Line 822 format(const struct req *req, const char *file) |
|
Line 822 format(const struct req *req, const char *file) |
|
struct man *man; |
struct man *man; |
void *vp; |
void *vp; |
char *opts; |
char *opts; |
enum mandoclevel rc; |
|
int fd; |
int fd; |
int usepath; |
int usepath; |
|
|
Line 832 format(const struct req *req, const char *file) |
|
Line 831 format(const struct req *req, const char *file) |
|
} |
} |
|
|
mchars = mchars_alloc(); |
mchars = mchars_alloc(); |
mp = mparse_alloc(MPARSE_SO, MANDOCLEVEL_FATAL, NULL, |
mp = mparse_alloc(MPARSE_SO, MANDOCLEVEL_BADARG, NULL, |
mchars, req->q.manpath); |
mchars, req->q.manpath); |
rc = mparse_readfd(mp, fd, file); |
mparse_readfd(mp, fd, file); |
close(fd); |
close(fd); |
|
|
if (rc >= MANDOCLEVEL_FATAL) { |
|
fprintf(stderr, "fatal mandoc error: %s/%s\n", |
|
req->q.manpath, file); |
|
pg_error_internal(); |
|
return; |
|
} |
|
|
|
usepath = strcmp(req->q.manpath, req->p[0]); |
usepath = strcmp(req->q.manpath, req->p[0]); |
mandoc_asprintf(&opts, |
mandoc_asprintf(&opts, |