summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2012-07-10 15:33:40 +0000
committerschwarze <schwarze@openbsd.org>2012-07-10 15:33:40 +0000
commitb74c9ca8596e050bd0cd61cc55d0e091bb2db7ff (patch)
tree110944ec0d5ebe4261e1ceb607a3b24ddfb0ba4d
parentWrap (diff)
downloadwireguard-openbsd-b74c9ca8596e050bd0cd61cc55d0e091bb2db7ff.tar.xz
wireguard-openbsd-b74c9ca8596e050bd0cd61cc55d0e091bb2db7ff.zip
Remove a hack that was intended for groff-1.15 bug compatibility:
When the width of a tag in .Bl -hang was exactly one character shorter than the maximum length that would fit, the following text would have a negative hang of one character (i.e., hang to the left). That bug is no longer present in groff-1.21, so relax mandoc, too.
-rw-r--r--regress/usr.bin/mandoc/mdoc/Bl/Makefile9
-rw-r--r--regress/usr.bin/mandoc/mdoc/Bl/hang.out_ascii4
-rw-r--r--usr.bin/mandoc/term.c9
3 files changed, 7 insertions, 15 deletions
diff --git a/regress/usr.bin/mandoc/mdoc/Bl/Makefile b/regress/usr.bin/mandoc/mdoc/Bl/Makefile
index 176e65041fd..34d28159333 100644
--- a/regress/usr.bin/mandoc/mdoc/Bl/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Bl/Makefile
@@ -1,17 +1,14 @@
-# $OpenBSD: Makefile,v 1.9 2012/07/10 14:35:57 schwarze Exp $
+# $OpenBSD: Makefile,v 1.10 2012/07/10 15:33:41 schwarze Exp $
REGRESS_TARGETS = item inset diag ohang bullet dash enum hang tag
REGRESS_TARGETS += column extend nested
-# mandoc still contains a compatibility hack with groff-1.15
-# regarding hang list indentation.
-
REGRESS_TARGETS+=multitype multitag empty unclosed
# groff-1.20.1 mishandles empty lists,
-# ruining indentation and sometimes cauisng empty lines.
+# ruining indentation and sometimes causing empty lines.
-SKIP_GROFF ?= hang empty
+SKIP_GROFF ?= empty
SKIP_TMAN ?= tag hang column extend nested multitype multitag empty
diff --git a/regress/usr.bin/mandoc/mdoc/Bl/hang.out_ascii b/regress/usr.bin/mandoc/mdoc/Bl/hang.out_ascii
index 93610dc1ca9..3ffe224b733 100644
--- a/regress/usr.bin/mandoc/mdoc/Bl/hang.out_ascii
+++ b/regress/usr.bin/mandoc/mdoc/Bl/hang.out_ascii
@@ -12,9 +12,9 @@ DDEESSCCRRIIPPTTIIOONN
x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
x x x x x x x x x x x x x x
- quint x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ quint x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
- x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x
indent x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
diff --git a/usr.bin/mandoc/term.c b/usr.bin/mandoc/term.c
index a30c2440d39..43d33868b43 100644
--- a/usr.bin/mandoc/term.c
+++ b/usr.bin/mandoc/term.c
@@ -1,4 +1,4 @@
-/* $Id: term.c,v 1.64 2012/05/28 13:00:51 schwarze Exp $ */
+/* $Id: term.c,v 1.65 2012/07/10 15:33:40 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2011, 2012 Ingo Schwarze <schwarze@openbsd.org>
@@ -261,16 +261,11 @@ term_flushln(struct termp *p)
p->overstep = (int)(vis - maxvis + (*p->width)(p, ' '));
/*
- * Behave exactly the same way as groff:
* If we have overstepped the margin, temporarily move
* it to the right and flag the rest of the line to be
* shorter.
- * If we landed right at the margin, be happy.
- * If we are one step before the margin, temporarily
- * move it one step LEFT and flag the rest of the line
- * to be longer.
*/
- if (p->overstep < -1)
+ if (p->overstep < 0)
p->overstep = 0;
return;