diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-05-04 22:16:09 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-05-04 22:16:09 +0000 |
commit | d4309408b94eb36fcea040582e8579967cb7878b (patch) | |
tree | 44fea1faa208f7aa8d912a43b25ee25ae1c50375 /man_term.c | |
parent | 6cff4f9d35431af8274477e9e1cd8dbb193f159a (diff) | |
download | mandoc-d4309408b94eb36fcea040582e8579967cb7878b.tar.gz mandoc-d4309408b94eb36fcea040582e8579967cb7878b.tar.zst mandoc-d4309408b94eb36fcea040582e8579967cb7878b.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 'man_term.c')
-rw-r--r-- | man_term.c | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.193 2017/05/04 17:48:28 schwarze Exp $ */ +/* $Id: man_term.c,v 1.194 2017/05/04 22:16:09 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2015, 2017 Ingo Schwarze <schwarze@openbsd.org> @@ -457,9 +457,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)) @@ -987,13 +985,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; } |