version 1.17, 2015/04/02 22:48:17 |
version 1.20, 2015/04/18 17:53:21 |
|
|
static void |
static void |
pmandoc(struct mparse *mp, int fd, const char *fn, int list) |
pmandoc(struct mparse *mp, int fd, const char *fn, int list) |
{ |
{ |
struct mdoc *mdoc; |
struct roff_man *man; |
struct man *man; |
|
int line, col; |
int line, col; |
|
|
mparse_readfd(mp, fd, fn); |
mparse_readfd(mp, fd, fn); |
mparse_result(mp, &mdoc, &man, NULL); |
mparse_result(mp, &man, NULL); |
line = 1; |
line = 1; |
col = 0; |
col = 0; |
|
|
if (mdoc) |
if (man == NULL) |
pmdoc(mdoc_node(mdoc), &line, &col, list); |
|
else if (man) |
|
pman(man_node(man), &line, &col, list); |
|
else |
|
return; |
return; |
|
if (man->macroset == MACROSET_MDOC) |
|
pmdoc(man->first->child, &line, &col, list); |
|
else |
|
pman(man->first->child, &line, &col, list); |
|
|
if ( ! list) |
if ( ! list) |
putchar('\n'); |
putchar('\n'); |