summaryrefslogtreecommitdiffstats
path: root/roff_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-12-31 07:08:12 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-12-31 07:08:12 +0000
commitc307b01e3d5709e7d34106b6fe8e98b468bf33f8 (patch)
tree939b2a1acb043c38c2dacc70855f028e163b6f42 /roff_term.c
parentc0cea6817b9d23d8e5e4a752fc1dff8dfb604cdc (diff)
downloadmandoc-c307b01e3d5709e7d34106b6fe8e98b468bf33f8.tar.gz
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 'roff_term.c')
-rw-r--r--roff_term.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/roff_term.c b/roff_term.c
index d0acc4f0..e99c5633 100644
--- a/roff_term.c
+++ b/roff_term.c
@@ -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;
}
}