summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/man_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2015-04-06 13:34:55 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2015-04-06 13:34:55 +0000
commit0ff12e3cf873de24de91f2a5e8321f13e8d72f4c (patch)
treea0a136a3001653b5bd96eb1c4424e7c52ecc62ce /usr.bin/mandoc/man_term.c
parentc0432c491ee3d0affec7b85ce749fdd7085897f8 (diff)
Use the default width for .RS without arguments.
Reduces groff-mandoc differences in base and Xenocara by about 4%. Found while looking at wpa_supplicant(8).
Diffstat (limited to 'usr.bin/mandoc/man_term.c')
-rw-r--r--usr.bin/mandoc/man_term.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/mandoc/man_term.c b/usr.bin/mandoc/man_term.c
index 9023d5d8474..066d25c707f 100644
--- a/usr.bin/mandoc/man_term.c
+++ b/usr.bin/mandoc/man_term.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: man_term.c,v 1.129 2015/04/04 18:52:12 schwarze Exp $ */
+/* $OpenBSD: man_term.c,v 1.130 2015/04/06 13:34:54 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -877,7 +877,9 @@ pre_RS(DECL_ARGS)
n = n->parent->head;
n->aux = SHRT_MAX + 1;
- if (n->child != NULL && a2roffsu(n->child->string, &su, SCALE_EN))
+ if (n->child == NULL)
+ n->aux = mt->lmargin[mt->lmargincur];
+ else if (a2roffsu(n->child->string, &su, SCALE_EN))
n->aux = term_hspan(p, &su) / 24;
if (n->aux < 0 && (size_t)(-n->aux) > mt->offset)
n->aux = -mt->offset;