diff options
author | 2017-05-04 22:07:44 +0000 | |
---|---|---|
committer | 2017-05-04 22:07:44 +0000 | |
commit | 96a5de472ceddce830e148f3c839441f7b9343b2 (patch) | |
tree | fcc212399dcdae50546a59c41f02be08c9f1a3c5 /usr.bin/mandoc/man_term.c | |
parent | enable brgphy, which appears in the edgerouter pro (diff) | |
download | wireguard-openbsd-96a5de472ceddce830e148f3c839441f7b9343b2.tar.xz wireguard-openbsd-96a5de472ceddce830e148f3c839441f7b9343b2.zip |
Start roff formatter modules for HTML and termininal output,
used by both the mdoc and man formatters, with the ultimate
goal of reducing code duplication between the two macro formatters.
Made possible by the parser unification.
Add the first formatting function (for the .br request).
Diffstat (limited to 'usr.bin/mandoc/man_term.c')
-rw-r--r-- | usr.bin/mandoc/man_term.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/usr.bin/mandoc/man_term.c b/usr.bin/mandoc/man_term.c index 526606aacba..467d719c7e2 100644 --- a/usr.bin/mandoc/man_term.c +++ b/usr.bin/mandoc/man_term.c @@ -1,4 +1,4 @@ -/* $OpenBSD: man_term.c,v 1.146 2017/05/04 17:48:24 schwarze Exp $ */ +/* $OpenBSD: man_term.c,v 1.147 2017/05/04 22:07:44 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2015, 2017 Ingo Schwarze <schwarze@openbsd.org> @@ -455,9 +455,7 @@ pre_sp(DECL_ARGS) } } - if (n->tok == ROFF_br) - len = 0; - else if (n->child == NULL) + if (n->child == NULL) len = 1; else { if ( ! a2roffsu(n->child->string, &su, SCALE_VS)) @@ -985,13 +983,7 @@ print_man_node(DECL_ARGS) } if (n->tok < ROFF_MAX) { - switch (n->tok) { - case ROFF_br: - pre_sp(p, mt, n, meta); - break; - default: - abort(); - } + roff_term_pre(p, n); return; } |