summaryrefslogtreecommitdiffstats
path: root/man_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-12-02 10:08:06 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-12-02 10:08:06 +0000
commit110fb75482f7f2c0f483cf8b3643b20e6600a1c4 (patch)
tree39019d1d0c3ea61d852d9f5fdd3fee3b59fd9051 /man_term.c
parentefe93b8f37e682132d735c3ed77f4c64aedc5aef (diff)
downloadmandoc-110fb75482f7f2c0f483cf8b3643b20e6600a1c4.tar.gz
Fix the implementation and documentation of \c (continue text input line).
In particular, make it work in no-fill mode, too. Reminded by Carsten dot Kunze at arcor dot de (Heirloom roff).
Diffstat (limited to 'man_term.c')
-rw-r--r--man_term.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/man_term.c b/man_term.c
index 1740c944..d6108cbb 100644
--- a/man_term.c
+++ b/man_term.c
@@ -1018,13 +1018,14 @@ out:
* -man doesn't have nested macros, we don't need to be
* more specific than this.
*/
- if (MANT_LITERAL & mt->fl && ! (TERMP_NOBREAK & p->flags) &&
- (NULL == n->next || MAN_LINE & n->next->flags)) {
+ if (mt->fl & MANT_LITERAL &&
+ ! (p->flags & (TERMP_NOBREAK | TERMP_NONEWLINE)) &&
+ (n->next == NULL || n->next->flags & MAN_LINE)) {
rm = p->rmargin;
rmax = p->maxrmargin;
p->rmargin = p->maxrmargin = TERM_MAXMARGIN;
p->flags |= TERMP_NOSPACE;
- if (NULL != n->string && '\0' != *n->string)
+ if (n->string != NULL && *n->string != '\0')
term_flushln(p);
else
term_newln(p);