summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2014-12-23 01:57:12 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2014-12-23 01:57:12 +0000
commit8da8ae9f95221eb5ce02be9614b190528626cc7a (patch)
treeda4fa79ad7a9231626ac46933a290a367260bedd /usr.bin/mandoc
parentbf8b0dbb63ee61719e5344bb420a2165b9ebf2f1 (diff)
correctly handle scaling units after .PD
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r--usr.bin/mandoc/man_term.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/mandoc/man_term.c b/usr.bin/mandoc/man_term.c
index b7ead70a122..a27a287ae45 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.112 2014/12/04 02:05:16 schwarze Exp $ */
+/* $OpenBSD: man_term.c,v 1.113 2014/12/23 01:57:11 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -286,14 +286,16 @@ pre_literal(DECL_ARGS)
static int
pre_PD(DECL_ARGS)
{
+ struct roffsu su;
n = n->child;
- if (0 == n) {
+ if (n == NULL) {
mt->pardist = 1;
return(0);
}
assert(MAN_TEXT == n->type);
- mt->pardist = atoi(n->string);
+ if (a2roffsu(n->string, &su, SCALE_VS))
+ mt->pardist = term_vspan(p, &su);
return(0);
}