diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-05-10 08:05:17 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-05-10 08:05:17 +0000 |
commit | bed4998695cb74458a9807c5d4904d4cafe6df51 (patch) | |
tree | 5fc5bf3cf422acc74a6c6223ac5c7295dffedba7 | |
parent | ec394264f288d5b965e81e12e6cbee8fb190ab13 (diff) | |
download | mandoc-bed4998695cb74458a9807c5d4904d4cafe6df51.tar.gz |
-man also now has unbound margins for literal context.
-rw-r--r-- | man_term.c | 6 | ||||
-rw-r--r-- | mdoc_term.c | 4 | ||||
-rw-r--r-- | term.h | 2 |
3 files changed, 6 insertions, 6 deletions
@@ -260,7 +260,6 @@ static int pre_fi(DECL_ARGS) { - p->rmargin = p->maxrmargin = 65; mt->fl &= ~MANT_LITERAL; return(1); } @@ -271,10 +270,7 @@ static int pre_nf(DECL_ARGS) { - p->rmargin = p->maxrmargin = 78; - term_newln(p); mt->fl |= MANT_LITERAL; - return(MAN_Vb != n->tok); } @@ -820,8 +816,10 @@ print_man_node(DECL_ARGS) /* FIXME: this means that macro lines are munged! */ if (MANT_LITERAL & mt->fl) { + p->rmargin = p->maxrmargin = TERM_MAXMARGIN; p->flags |= TERMP_NOSPACE; term_flushln(p); + p->rmargin = p->maxrmargin = 65; } break; default: diff --git a/mdoc_term.c b/mdoc_term.c index 282d271a..b175c784 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1659,7 +1659,7 @@ termp_bd_pre(DECL_ARGS) rm = p->rmargin; rmax = p->maxrmargin; - p->rmargin = p->maxrmargin = 100000; /* FIXME */ + p->rmargin = p->maxrmargin = TERM_MAXMARGIN; for (nn = n->child; nn; nn = nn->next) { p->flags |= TERMP_NOSPACE; @@ -1695,7 +1695,7 @@ termp_bd_post(DECL_ARGS) rmax = p->maxrmargin; if (MDOC_Literal == type || MDOC_Unfilled == type) - p->rmargin = p->maxrmargin = 100000; /* FIXME */ + p->rmargin = p->maxrmargin = TERM_MAXMARGIN; p->flags |= TERMP_NOSPACE; term_flushln(p); @@ -29,6 +29,8 @@ enum termfont { TERMFONT_UNDER }; +#define TERM_MAXMARGIN 100000 /* FIXME */ + struct termp { size_t rmargin; /* Current right margin. */ size_t maxrmargin; /* Max right margin. */ |