=================================================================== RCS file: /cvs/mandoc/man_term.c,v retrieving revision 1.166 retrieving revision 1.170 diff -u -p -r1.166 -r1.170 --- mandoc/man_term.c 2015/01/24 02:41:49 1.166 +++ mandoc/man_term.c 2015/03/15 16:53:41 1.170 @@ -1,7 +1,7 @@ -/* $Id: man_term.c,v 1.166 2015/01/24 02:41:49 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 @@ -743,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; @@ -945,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: @@ -1007,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