diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2018-12-31 08:03:35 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2018-12-31 08:03:35 +0000 |
commit | 710bec28e3247443d33d66c897d226610c0a569c (patch) | |
tree | 5e158d91a0a708033bd59d0ecf68c221f88ef2e8 /usr.bin/mandoc/man_macro.c | |
parent | 417e19e0e393ccfd0c6c81f8af2122009cd9a0c2 (diff) |
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 'usr.bin/mandoc/man_macro.c')
-rw-r--r-- | usr.bin/mandoc/man_macro.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/mandoc/man_macro.c b/usr.bin/mandoc/man_macro.c index cca39575990..009fe26bf2d 100644 --- a/usr.bin/mandoc/man_macro.c +++ b/usr.bin/mandoc/man_macro.c @@ -1,4 +1,4 @@ -/* $OpenBSD: man_macro.c,v 1.102 2018/12/31 07:07:43 schwarze Exp $ */ +/* $OpenBSD: man_macro.c,v 1.103 2018/12/31 08:03:34 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2012-2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org> @@ -379,6 +379,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, |