aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/out.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-06-15 00:27:52 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-06-15 00:27:52 +0000
commit29faaf9040c5e238e8b14faf2d795d1cda4b2edc (patch)
tree1a289b36fc6d112a70ee99cfc6054610bcc3c0e1 /out.c
parent0fa63c17427ebc9bb3803ef77f6d3adff71a6e9a (diff)
downloadmandoc-29faaf9040c5e238e8b14faf2d795d1cda4b2edc.tar.gz
mandoc-29faaf9040c5e238e8b14faf2d795d1cda4b2edc.tar.zst
mandoc-29faaf9040c5e238e8b14faf2d795d1cda4b2edc.zip
round default width of tbl(7) text blocks in the same way as groff
Diffstat (limited to 'out.c')
-rw-r--r--out.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/out.c b/out.c
index 95720c53..5fd15343 100644
--- a/out.c
+++ b/out.c
@@ -1,4 +1,4 @@
-/* $Id: out.c,v 1.68 2017/06/14 18:23:37 schwarze Exp $ */
+/* $Id: out.c,v 1.69 2017/06/15 00:27:52 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2014, 2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -157,7 +157,8 @@ tblcalc(struct rofftbl *tbl, const struct tbl_span *sp,
tblcalc_data(tbl, col, opts, dp,
dp->block == 0 ? 0 :
dp->layout->width ? dp->layout->width :
- rmargin ? rmargin / (sp->opts->cols + 1) : 0);
+ rmargin ? (rmargin + sp->opts->cols / 2)
+ / (sp->opts->cols + 1) : 0);
}
}