aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man_term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-01-01 12:59:17 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-01-01 12:59:17 +0000
commitc80b8c034f0e42db26a04a17527b0b7e3dc6512b (patch)
tree7a146488e062534e63eb8c284052e30e2d869cd6 /man_term.c
parent625153bf5457ded8b8946e7f0f831993b94dd863 (diff)
downloadmandoc-c80b8c034f0e42db26a04a17527b0b7e3dc6512b.tar.gz
mandoc-c80b8c034f0e42db26a04a17527b0b7e3dc6512b.tar.zst
mandoc-c80b8c034f0e42db26a04a17527b0b7e3dc6512b.zip
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.
Diffstat (limited to 'man_term.c')
-rw-r--r--man_term.c12
1 files changed, 10 insertions, 2 deletions
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 <kristaps@bsd.lv>
*
@@ -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)