=================================================================== RCS file: /cvs/mandoc/man_term.c,v retrieving revision 1.140 retrieving revision 1.143 diff -u -p -r1.140 -r1.143 --- mandoc/man_term.c 2014/02/16 12:33:39 1.140 +++ mandoc/man_term.c 2014/03/30 19:47:48 1.143 @@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.140 2014/02/16 12:33:39 schwarze Exp $ */ +/* $Id: man_term.c,v 1.143 2014/03/30 19:47:48 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2014 Ingo Schwarze @@ -84,6 +84,7 @@ static int pre_ft(DECL_ARGS); static int pre_ign(DECL_ARGS); static int pre_in(DECL_ARGS); static int pre_literal(DECL_ARGS); +static int pre_ll(DECL_ARGS); static int pre_sp(DECL_ARGS); static void post_IP(DECL_ARGS); @@ -133,6 +134,7 @@ static const struct termact termacts[MAN_MAX] = { { pre_literal, NULL, 0 }, /* EE */ { pre_UR, post_UR, 0 }, /* UR */ { NULL, NULL, 0 }, /* UE */ + { pre_ll, NULL, MAN_NOTEXT }, /* ll */ }; @@ -237,6 +239,16 @@ pre_ign(DECL_ARGS) /* ARGSUSED */ static int +pre_ll(DECL_ARGS) +{ + + (*p->setwidth)(p, n->nchild ? a2width(p, n->child->string) : 0); + return(0); +} + + +/* ARGSUSED */ +static int pre_I(DECL_ARGS) { @@ -720,7 +732,7 @@ pre_TP(DECL_ARGS) /* Calculate offset. */ if (NULL != (nn = n->parent->head->child)) - if (nn->string && nn->parent->line == nn->line) + if (nn->string && 0 == (MAN_LINE & nn->flags)) if ((ival = a2width(p, nn->string)) >= 0) len = (size_t)ival; @@ -737,10 +749,15 @@ pre_TP(DECL_ARGS) mt->fl &= ~MANT_LITERAL; /* Don't print same-line elements. */ - for (nn = n->child; nn; nn = nn->next) - if (nn->line > n->line) - print_man_node(p, mt, nn, meta); + nn = n->child; + while (NULL != nn && 0 == (MAN_LINE & nn->flags)) + nn = nn->next; + while (NULL != nn) { + print_man_node(p, mt, nn, meta); + nn = nn->next; + } + if (savelit) mt->fl |= MANT_LITERAL; if (ival >= 0) @@ -1040,7 +1057,7 @@ out: * more specific than this. */ if (MANT_LITERAL & mt->fl && ! (TERMP_NOBREAK & p->flags) && - (NULL == n->next || n->next->line > n->line)) { + (NULL == n->next || MAN_LINE & n->next->flags)) { rm = p->rmargin; rmax = p->maxrmargin; p->rmargin = p->maxrmargin = TERM_MAXMARGIN;