summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2013-08-05 23:35:02 +0000
committerschwarze <schwarze@openbsd.org>2013-08-05 23:35:02 +0000
commitedc67808fabb3ac57948ad4d02115492391c2ca1 (patch)
tree90b0be6754d39e47be1e70d7c6fc984f54b181f0
parentFirst stab at updating this monster to the Intel/FreeBSD current version. (diff)
downloadwireguard-openbsd-edc67808fabb3ac57948ad4d02115492391c2ca1.tar.xz
wireguard-openbsd-edc67808fabb3ac57948ad4d02115492391c2ca1.zip
After a leading blank on an output line, the first word was counted twice
against vend, causing a premature line break. Fix that bug by reverting revision 1.10 which Kristaps committed four years ago. Kristaps patch is no longer needed because the code below /* Write out the [remaining] word. */ now handles leading blanks correctly, probably already for a long time. This avoids premature line breaks in about a dozen base system manuals, for example as(1) and gdb(1), and alignment issues in another twenty, for example mount(2), ip6(4), pfctl(8), and crypto(9).
-rw-r--r--usr.bin/mandoc/term.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mandoc/term.c b/usr.bin/mandoc/term.c
index 51b4a8dc2aa..369a3583f73 100644
--- a/usr.bin/mandoc/term.c
+++ b/usr.bin/mandoc/term.c
@@ -1,4 +1,4 @@
-/* $Id: term.c,v 1.68 2013/05/29 15:15:49 schwarze Exp $ */
+/* $Id: term.c,v 1.69 2013/08/05 23:35:02 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2011, 2012 Ingo Schwarze <schwarze@openbsd.org>
@@ -158,7 +158,7 @@ term_flushln(struct termp *p)
*/
for (j = i, jhy = 0; j < p->col; j++) {
- if ((j && ' ' == p->buf[j]) || '\t' == p->buf[j])
+ if (' ' == p->buf[j] || '\t' == p->buf[j])
break;
/* Back over the the last printed character. */