From c80b8c034f0e42db26a04a17527b0b7e3dc6512b Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sat, 1 Jan 2011 12:59:17 +0000 Subject: Add -man support for tables. Like -mdoc, this consists of an external-facing function man_addspan() (this required shuffling around the descope routine) and hooks elsewhere. Also fixed mdoc.c's post-validation of tables. --- man_term.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'man_term.c') diff --git a/man_term.c b/man_term.c index 77e88aee..4517e98d 100644 --- a/man_term.c +++ b/man_term.c @@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.90 2010/12/08 10:58:22 kristaps Exp $ */ +/* $Id: man_term.c,v 1.91 2011/01/01 12:59:17 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * @@ -865,6 +865,8 @@ print_man_node(DECL_ARGS) p->maxrmargin = rmax; } break; + case (MAN_TBL): + break; default: if ( ! (MAN_NOTEXT & termacts[n->tok].flags)) term_fontrepl(p, TERMFONT_NONE); @@ -876,11 +878,17 @@ print_man_node(DECL_ARGS) if (c && n->child) print_man_nodelist(p, mt, n->child, m); - if (MAN_TEXT != n->type) { + switch (n->type) { + case (MAN_TEXT): + /* FALLTHROUGH */ + case (MAN_TBL): + break; + default: if (termacts[n->tok].post) (*termacts[n->tok].post)(p, mt, n, m); if ( ! (MAN_NOTEXT & termacts[n->tok].flags)) term_fontrepl(p, TERMFONT_NONE); + break; } if (MAN_EOS & n->flags) -- cgit v1.2.3