summaryrefslogtreecommitdiffstats
path: root/man_macro.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-12-31 08:03:46 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-12-31 08:03:46 +0000
commit9e730211d90e0003bae917b6a4c52e29a60f192a (patch)
tree6f22ffb1b507ffd50b66459c9f213be4af57b9a2 /man_macro.c
parent2ec872dc0da85b23fb0d72c9d83ec1aa8f06ea19 (diff)
downloadmandoc-9e730211d90e0003bae917b6a4c52e29a60f192a.tar.gz
For .EX and .EE, set the fill mode parser state directly in the
macro parsing function, in the same way as the roff parser already does it for the .nf and .fi requests. This is a preparation for getting rid of the ugly function man_state() later on.
Diffstat (limited to 'man_macro.c')
-rw-r--r--man_macro.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/man_macro.c b/man_macro.c
index 4519da6c..9d460c1d 100644
--- a/man_macro.c
+++ b/man_macro.c
@@ -381,6 +381,11 @@ in_line_eoln(MACRO_PROT_ARGS)
roff_elem_alloc(man, line, ppos, tok);
n = man->last;
+ if (tok == MAN_EX)
+ man->flags |= ROFF_NOFILL;
+ else if (tok == MAN_EE)
+ man->flags &= ~ROFF_NOFILL;
+
for (;;) {
if (buf[*pos] != '\0' && man->last != n && tok == MAN_PD) {
mandoc_msg(MANDOCERR_ARG_EXCESS, line, *pos,