X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/49fc5b876caef96271d1484f9279fd423d9b04ff..27178e6666d82be945ee668c2530249f5c728eb6:/man_term.c?ds=sidebyside diff --git a/man_term.c b/man_term.c index 3c059283..5a659503 100644 --- a/man_term.c +++ b/man_term.c @@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.141 2014/03/08 15:50:41 schwarze Exp $ */ +/* $Id: man_term.c,v 1.145 2014/04/08 07:13:11 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 */ }; @@ -235,6 +237,16 @@ pre_ign(DECL_ARGS) } +/* ARGSUSED */ +static int +pre_ll(DECL_ARGS) +{ + + term_setwidth(p, n->nchild ? n->child->string : NULL); + return(0); +} + + /* ARGSUSED */ static int pre_I(DECL_ARGS) @@ -266,7 +278,7 @@ pre_literal(DECL_ARGS) p->offset = p->rmargin; p->rmargin = p->maxrmargin; p->trailspace = 0; - p->flags &= ~TERMP_NOBREAK; + p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND); p->flags |= TERMP_NOSPACE; } @@ -535,7 +547,7 @@ pre_HP(DECL_ARGS) } if ( ! (MANT_LITERAL & mt->fl)) { - p->flags |= TERMP_NOBREAK; + p->flags |= TERMP_NOBREAK | TERMP_BRIND; p->trailspace = 2; } @@ -570,7 +582,7 @@ post_HP(DECL_ARGS) switch (n->type) { case (MAN_BODY): term_newln(p); - p->flags &= ~TERMP_NOBREAK; + p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND); p->trailspace = 0; p->offset = mt->offset; p->rmargin = p->maxrmargin; @@ -1045,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;