diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2018-12-31 07:08:12 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2018-12-31 07:08:12 +0000 |
commit | c307b01e3d5709e7d34106b6fe8e98b468bf33f8 (patch) | |
tree | 939b2a1acb043c38c2dacc70855f028e163b6f42 /man_macro.c | |
parent | c0cea6817b9d23d8e5e4a752fc1dff8dfb604cdc (diff) | |
download | mandoc-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 'man_macro.c')
-rw-r--r-- | man_macro.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/man_macro.c b/man_macro.c index d652a431..4519da6c 100644 --- a/man_macro.c +++ b/man_macro.c @@ -63,8 +63,6 @@ static const struct man_macro man_macros[MAN_MAX - MAN_TH] = { { in_line_eoln, MAN_NSCOPED | MAN_ESCOPED | MAN_JOIN }, /* I */ { in_line_eoln, 0 }, /* IR */ { in_line_eoln, 0 }, /* RI */ - { in_line_eoln, MAN_NSCOPED }, /* nf */ - { in_line_eoln, MAN_NSCOPED }, /* fi */ { blk_close, MAN_XSCOPE }, /* RE */ { blk_exp, MAN_XSCOPE }, /* RS */ { in_line_eoln, 0 }, /* DT */ @@ -340,9 +338,9 @@ blk_imp(MACRO_PROT_ARGS) struct roff_node *n; rew_scope(man, tok); - n = roff_block_alloc(man, line, ppos, tok); - if (n->tok == MAN_SH || n->tok == MAN_SS) - man->flags &= ~MAN_LITERAL; + if (tok == MAN_SH || tok == MAN_SS) + man->flags &= ~ROFF_NOFILL; + roff_block_alloc(man, line, ppos, tok); n = roff_head_alloc(man, line, ppos, tok); /* Add line arguments. */ @@ -384,11 +382,6 @@ in_line_eoln(MACRO_PROT_ARGS) n = man->last; for (;;) { - if (buf[*pos] != '\0' && (tok == MAN_fi || tok == MAN_nf)) { - mandoc_msg(MANDOCERR_ARG_SKIP, line, *pos, - "%s %s", roff_name[tok], buf + *pos); - break; - } if (buf[*pos] != '\0' && man->last != n && tok == MAN_PD) { mandoc_msg(MANDOCERR_ARG_EXCESS, line, *pos, "%s ... %s", roff_name[tok], buf + *pos); |