summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/mdoc_man.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2012-07-16 10:45:28 +0000
committerschwarze <schwarze@openbsd.org>2012-07-16 10:45:28 +0000
commitda5e360cbdbde3a879882882b5b039b37b22a863 (patch)
treef6c16b8f5e960b4c4a6f69301c0ad4760aad1bd7 /usr.bin/mandoc/mdoc_man.c
parentSeveral -mdoc parser improvements related to vertical spacing: (diff)
downloadwireguard-openbsd-da5e360cbdbde3a879882882b5b039b37b22a863.tar.xz
wireguard-openbsd-da5e360cbdbde3a879882882b5b039b37b22a863.zip
Two fixes regarding -Tman .sp:
* Keep height argument on the same line (it got printed to the output). * For .El .sp, avoid the weird .sp -1v .PP .sp output sequence.
Diffstat (limited to 'usr.bin/mandoc/mdoc_man.c')
-rw-r--r--usr.bin/mandoc/mdoc_man.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mdoc_man.c b/usr.bin/mandoc/mdoc_man.c
index 6d180fd9381..41f12fcec5d 100644
--- a/usr.bin/mandoc/mdoc_man.c
+++ b/usr.bin/mandoc/mdoc_man.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_man.c,v 1.37 2012/07/14 09:05:58 schwarze Exp $ */
+/* $Id: mdoc_man.c,v 1.38 2012/07/16 10:45:28 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -1338,7 +1338,11 @@ static int
pre_sp(DECL_ARGS)
{
- print_line(".sp", MMAN_nl);
+ if (MMAN_PP & outflags) {
+ outflags &= ~MMAN_PP;
+ print_line(".PP", 0);
+ } else
+ print_line(".sp", 0);
return(1);
}