=================================================================== RCS file: /cvs/mandoc/man_term.c,v retrieving revision 1.165 retrieving revision 1.170 diff -u -p -r1.165 -r1.170 --- mandoc/man_term.c 2014/12/24 18:04:10 1.165 +++ mandoc/man_term.c 2015/03/15 16:53:41 1.170 @@ -1,7 +1,7 @@ -/* $Id: man_term.c,v 1.165 2014/12/24 18:04:10 schwarze Exp $ */ +/* $Id: man_term.c,v 1.170 2015/03/15 16:53:41 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons - * Copyright (c) 2010-2014 Ingo Schwarze + * Copyright (c) 2010-2015 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -114,7 +114,6 @@ static const struct termact termacts[MAN_MAX] = { { pre_I, NULL, 0 }, /* I */ { pre_alternate, NULL, 0 }, /* IR */ { pre_alternate, NULL, 0 }, /* RI */ - { pre_ign, NULL, MAN_NOTEXT }, /* na */ { pre_sp, NULL, MAN_NOTEXT }, /* sp */ { pre_literal, NULL, 0 }, /* nf */ { pre_literal, NULL, 0 }, /* fi */ @@ -744,7 +743,8 @@ pre_SS(DECL_ARGS) do { n = n->prev; - } while (n != NULL && termacts[n->tok].flags & MAN_NOTEXT); + } while (n != NULL && n->tok != MAN_MAX && + termacts[n->tok].flags & MAN_NOTEXT); if (n == NULL || (n->tok == MAN_SS && n->body->child == NULL)) break; @@ -946,12 +946,8 @@ print_man_node(DECL_ARGS) p->flags |= TERMP_NOSPACE; return; case MAN_TBL: - /* - * Tables are preceded by a newline. Then process a - * table line, which will cause line termination, - */ - if (TBL_SPAN_FIRST & n->span->flags) - term_newln(p); + if (p->tbl.cols == NULL) + term_vspace(p); term_tbl(p, n->span); return; default: @@ -1008,10 +1004,10 @@ static void print_man_nodelist(DECL_ARGS) { - print_man_node(p, mt, n, meta); - if ( ! n->next) - return; - print_man_nodelist(p, mt, n->next, meta); + while (n != NULL) { + print_man_node(p, mt, n, meta); + n = n->next; + } } static void