From d4309408b94eb36fcea040582e8579967cb7878b Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 4 May 2017 22:16:09 +0000 Subject: 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). --- man_term.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'man_term.c') diff --git a/man_term.c b/man_term.c index 87579adb..d6ddf762 100644 --- a/man_term.c +++ b/man_term.c @@ -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 * Copyright (c) 2010-2015, 2017 Ingo Schwarze @@ -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; } -- cgit v1.2.3-56-ge451