diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2018-12-31 07:07:44 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2018-12-31 07:07:44 +0000 |
commit | 7f8ae632897b204e9dd5a4b3377b6079963f9f86 (patch) | |
tree | bf4fe28ff19bd7790b899680082545ca5d7c9afa /usr.bin/mandoc/roff_term.c | |
parent | 9dc0cbc9432027eab2d3c04c14013690b258818c (diff) |
Move parsing of the .nf and .fi (fill mode) requests from the man(7)
parser to the roff(7) parser. As a side effect, .nf and .fi are
now also parsed in mdoc(7) input, though the mdoc(7) formatters
still ignore most of their effect.
Diffstat (limited to 'usr.bin/mandoc/roff_term.c')
-rw-r--r-- | usr.bin/mandoc/roff_term.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/mandoc/roff_term.c b/usr.bin/mandoc/roff_term.c index 80e6b90a885..20b2e4a29c7 100644 --- a/usr.bin/mandoc/roff_term.c +++ b/usr.bin/mandoc/roff_term.c @@ -1,4 +1,4 @@ -/* $OpenBSD: roff_term.c,v 1.17 2018/12/15 23:33:20 schwarze Exp $ */ +/* $OpenBSD: roff_term.c,v 1.18 2018/12/31 07:07:43 schwarze Exp $ */ /* * Copyright (c) 2010,2014,2015,2017,2018 Ingo Schwarze <schwarze@openbsd.org> * @@ -42,9 +42,11 @@ static void roff_term_pre_ti(ROFF_TERM_ARGS); static const roff_term_pre_fp roff_term_pre_acts[ROFF_MAX] = { roff_term_pre_br, /* br */ roff_term_pre_ce, /* ce */ + roff_term_pre_br, /* fi */ roff_term_pre_ft, /* ft */ roff_term_pre_ll, /* ll */ roff_term_pre_mc, /* mc */ + roff_term_pre_br, /* nf */ roff_term_pre_po, /* po */ roff_term_pre_ce, /* rj */ roff_term_pre_sp, /* sp */ @@ -67,7 +69,9 @@ roff_term_pre_br(ROFF_TERM_ARGS) if (p->flags & TERMP_BRIND) { p->tcol->offset = p->tcol->rmargin; p->tcol->rmargin = p->maxrmargin; + p->trailspace = 0; p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND); + p->flags |= TERMP_NOSPACE; } } |