summaryrefslogtreecommitdiffstats
path: root/man_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-04-18 17:53:21 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-04-18 17:53:21 +0000
commitd4d5d006d52687c2882e89b913c70967626da0e1 (patch)
treebc16a6725a85bb2b430e2ac2de6f2a83721bb6a8 /man_term.c
parentafd3f3a3f381e6bd5e6803a730f57302dd9234d2 (diff)
downloadmandoc-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 'man_term.c')
-rw-r--r--man_term.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/man_term.c b/man_term.c
index d488e063..5067d0ce 100644
--- a/man_term.c
+++ b/man_term.c
@@ -141,25 +141,20 @@ void
terminal_man(void *arg, const struct roff_man *man)
{
struct termp *p;
- const struct roff_meta *meta;
struct roff_node *n;
struct mtermp mt;
p = (struct termp *)arg;
-
p->overstep = 0;
p->rmargin = p->maxrmargin = p->defrmargin;
p->tabwidth = term_len(p, 5);
- n = man_node(man)->child;
- meta = man_meta(man);
-
memset(&mt, 0, sizeof(struct mtermp));
-
mt.lmargin[mt.lmargincur] = term_len(p, p->defindent);
mt.offset = term_len(p, p->defindent);
mt.pardist = 1;
+ n = man->first->child;
if (p->synopsisonly) {
while (n != NULL) {
if (n->tok == MAN_SH &&
@@ -167,7 +162,8 @@ terminal_man(void *arg, const struct roff_man *man)
!strcmp(n->child->child->string, "SYNOPSIS")) {
if (n->child->next->child != NULL)
print_man_nodelist(p, &mt,
- n->child->next->child, meta);
+ n->child->next->child,
+ &man->meta);
term_newln(p);
break;
}
@@ -176,10 +172,10 @@ terminal_man(void *arg, const struct roff_man *man)
} else {
if (p->defindent == 0)
p->defindent = 7;
- term_begin(p, print_man_head, print_man_foot, meta);
+ term_begin(p, print_man_head, print_man_foot, &man->meta);
p->flags |= TERMP_NOSPACE;
if (n != NULL)
- print_man_nodelist(p, &mt, n, meta);
+ print_man_nodelist(p, &mt, n, &man->meta);
term_end(p);
}
}