diff options
Diffstat (limited to 'tree.c')
-rw-r--r-- | tree.c | 24 |
1 files changed, 17 insertions, 7 deletions
@@ -74,16 +74,16 @@ print_mdoc(const struct roff_node *n, int indent) t = "block"; break; case ROFFT_HEAD: - t = "block-head"; + t = "head"; break; case ROFFT_BODY: if (n->end) t = "body-end"; else - t = "block-body"; + t = "body"; break; case ROFFT_TAIL: - t = "block-tail"; + t = "tail"; break; case ROFFT_ELEM: t = "elem"; @@ -159,9 +159,16 @@ print_mdoc(const struct roff_node *n, int indent) } putchar(' '); + if (MDOC_DELIMO & n->flags) + putchar('('); if (MDOC_LINE & n->flags) putchar('*'); - printf("%d:%d\n", n->line, n->pos + 1); + printf("%d:%d", n->line, n->pos + 1); + if (MDOC_DELIMC & n->flags) + putchar(')'); + if (MDOC_EOS & n->flags) + putchar('.'); + putchar('\n'); } if (n->eqn) @@ -198,10 +205,10 @@ print_man(const struct roff_node *n, int indent) t = "block"; break; case ROFFT_HEAD: - t = "block-head"; + t = "head"; break; case ROFFT_BODY: - t = "block-body"; + t = "body"; break; case ROFFT_TBL: break; @@ -246,7 +253,10 @@ print_man(const struct roff_node *n, int indent) printf("%s (%s) ", p, t); if (MAN_LINE & n->flags) putchar('*'); - printf("%d:%d\n", n->line, n->pos + 1); + printf("%d:%d", n->line, n->pos + 1); + if (MAN_EOS & n->flags) + putchar('.'); + putchar('\n'); } if (n->eqn) |