diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-01 12:59:17 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-01 12:59:17 +0000 |
commit | c80b8c034f0e42db26a04a17527b0b7e3dc6512b (patch) | |
tree | 7a146488e062534e63eb8c284052e30e2d869cd6 /man_term.c | |
parent | 625153bf5457ded8b8946e7f0f831993b94dd863 (diff) | |
download | mandoc-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.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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) |