aboutsummaryrefslogtreecommitdiffstatshomepage
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
commitfe05b565a018bd5034ccaf1b3ea0599e89302c20 (patch)
tree93390be9392a8f074eef0e19e96f004fb7e759e5 /man_term.c
parent8bc86dcb30b0c91240c4be7dd73585cfc36ae8f3 (diff)
downloadmandoc-fe05b565a018bd5034ccaf1b3ea0599e89302c20.tar.gz
mandoc-fe05b565a018bd5034ccaf1b3ea0599e89302c20.tar.zst
mandoc-fe05b565a018bd5034ccaf1b3ea0599e89302c20.zip
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.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/man_term.c b/man_term.c
index 2531f816..5770c596 100644
--- a/man_term.c
+++ b/man_term.c
@@ -1,4 +1,4 @@
-/* $Id: man_term.c,v 1.156 2014/11/21 01:52:53 schwarze Exp $ */
+/* $Id: man_term.c,v 1.157 2014/12/02 10:08:06 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -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);