diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-04-18 17:53:21 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-04-18 17:53:21 +0000 |
commit | d4d5d006d52687c2882e89b913c70967626da0e1 (patch) | |
tree | bc16a6725a85bb2b430e2ac2de6f2a83721bb6a8 /mdoc_term.c | |
parent | afd3f3a3f381e6bd5e6803a730f57302dd9234d2 (diff) | |
download | mandoc-d4d5d006d52687c2882e89b913c70967626da0e1.tar.gz |
Delete the wrapper functions mdoc_meta(), man_meta(), mdoc_node(),
man_node() from the mandoc(3) semi-public interface and the internal
wrapper functions print_mdoc() and print_man() from the HTML formatters.
Minus 60 lines of code, no functional change.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r-- | mdoc_term.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/mdoc_term.c b/mdoc_term.c index 68338ebd..a2ce71fc 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -253,25 +253,22 @@ static const struct termact termacts[MDOC_MAX] = { void terminal_mdoc(void *arg, const struct roff_man *mdoc) { - const struct roff_meta *meta; struct roff_node *n; struct termp *p; p = (struct termp *)arg; - p->overstep = 0; p->rmargin = p->maxrmargin = p->defrmargin; p->tabwidth = term_len(p, 5); - n = mdoc_node(mdoc)->child; - meta = mdoc_meta(mdoc); - + n = mdoc->first->child; if (p->synopsisonly) { while (n != NULL) { if (n->tok == MDOC_Sh && n->sec == SEC_SYNOPSIS) { if (n->child->next->child != NULL) print_mdoc_nodelist(p, NULL, - meta, n->child->next->child); + &mdoc->meta, + n->child->next->child); term_newln(p); break; } @@ -280,11 +277,12 @@ terminal_mdoc(void *arg, const struct roff_man *mdoc) } else { if (p->defindent == 0) p->defindent = 5; - term_begin(p, print_mdoc_head, print_mdoc_foot, meta); + term_begin(p, print_mdoc_head, print_mdoc_foot, + &mdoc->meta); if (n != NULL) { if (n->tok != MDOC_Sh) term_vspace(p); - print_mdoc_nodelist(p, NULL, meta, n); + print_mdoc_nodelist(p, NULL, &mdoc->meta, n); } term_end(p); } |