aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-04-06 13:35:08 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-04-06 13:35:08 +0000
commitbe16c6b2869526a6cf4cb39790990d8632c7b2de (patch)
treec7bf679f3452a269b7d7310ceb3ae40f5e75ef59
parente870afcbdc7daf017837e9e2069000d1c6bc5f58 (diff)
downloadmandoc-be16c6b2869526a6cf4cb39790990d8632c7b2de.tar.gz
mandoc-be16c6b2869526a6cf4cb39790990d8632c7b2de.tar.zst
mandoc-be16c6b2869526a6cf4cb39790990d8632c7b2de.zip
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).
-rw-r--r--man_term.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/man_term.c b/man_term.c
index d4a03de8..113f3740 100644
--- a/man_term.c
+++ b/man_term.c
@@ -1,4 +1,4 @@
-/* $Id: man_term.c,v 1.176 2015/04/04 18:52:51 schwarze Exp $ */
+/* $Id: man_term.c,v 1.177 2015/04/06 13:35:08 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -879,7 +879,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;