summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2014-12-02 10:07:18 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2014-12-02 10:07:18 +0000
commitd1ee2ba11fb743e58aa2d47ed35ad3cd15a1a6ee (patch)
tree352dfa7c68418e531d642f50a59f307e17b50f66 /usr.bin/mandoc/term.c
parent4c9086c86bb65523d4879c5597633949740fa507 (diff)
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 'usr.bin/mandoc/term.c')
-rw-r--r--usr.bin/mandoc/term.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mandoc/term.c b/usr.bin/mandoc/term.c
index 39d5e8ebd62..5172d4b84ca 100644
--- a/usr.bin/mandoc/term.c
+++ b/usr.bin/mandoc/term.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: term.c,v 1.96 2014/11/21 01:52:45 schwarze Exp $ */
+/* $OpenBSD: term.c,v 1.97 2014/12/02 10:07:17 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -415,7 +415,7 @@ term_word(struct termp *p, const char *word)
else
p->flags |= TERMP_NOSPACE;
- p->flags &= ~TERMP_SENTENCE;
+ p->flags &= ~(TERMP_SENTENCE | TERMP_NONEWLINE);
while ('\0' != *word) {
if ('\\' != *word) {
@@ -485,7 +485,7 @@ term_word(struct termp *p, const char *word)
if (TERMP_SKIPCHAR & p->flags)
p->flags &= ~TERMP_SKIPCHAR;
else if ('\0' == *word)
- p->flags |= TERMP_NOSPACE;
+ p->flags |= (TERMP_NOSPACE | TERMP_NONEWLINE);
continue;
case ESCAPE_SKIPCHAR:
p->flags |= TERMP_SKIPCHAR;