summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2009-07-26 00:40:29 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2009-07-26 00:40:29 +0000
commit3d33a6e5e4739ba017b9cf9d79d72264cd1050da (patch)
treeb48c612b8c4ae0d42371b7b815fe1564546d5857 /usr.bin
parent45f24f934b29e47c9a8362afafdd515fecece3ed (diff)
sync to 1.8.1: correct vis count for erroneously-decorated whitespace;
while here, add a new FIXME wrt .Bl -diag
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/mandoc/term.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/mandoc/term.c b/usr.bin/mandoc/term.c
index 7b9c2e9ee24..5061c46886e 100644
--- a/usr.bin/mandoc/term.c
+++ b/usr.bin/mandoc/term.c
@@ -1,4 +1,4 @@
-/* $Id: term.c,v 1.7 2009/07/26 00:28:50 schwarze Exp $ */
+/* $Id: term.c,v 1.8 2009/07/26 00:40:28 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -204,7 +204,10 @@ term_isopendelim(const char *p)
* possible).
*
* FIXME: newline breaks occur (in groff) also occur when a single
- * space follows a NOBREAK!
+ * space follows a NOBREAK (try `Bl -tag')
+ *
+ * FIXME: there's a newline error where a `Bl -diag' will have a
+ * trailing newline if the line is exactly 73 chars long.
*/
void
term_flushln(struct termp *p)
@@ -252,10 +255,10 @@ term_flushln(struct termp *p)
/* LINTED */
for (j = i, vsz = 0; j < (int)p->col; j++) {
- if (' ' == p->buf[j])
+ if (' ' == p->buf[j])
break;
else if (8 == p->buf[j])
- j += 1;
+ vsz--;
else
vsz++;
}