version 1.18, 2015/04/18 16:06:39 |
version 1.19, 2015/04/18 16:34:25 |
|
|
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 roff_man *mdoc; |
|
struct roff_man *man; |
struct roff_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(mdoc_node(man), &line, &col, list); |
|
else |
|
pman(man_node(man), &line, &col, list); |
|
|
if ( ! list) |
if ( ! list) |
putchar('\n'); |
putchar('\n'); |