summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/mdoc_man.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2013-09-15 18:48:26 +0000
committerschwarze <schwarze@openbsd.org>2013-09-15 18:48:26 +0000
commitfe69a9a4bf7bd3da0ea0918bbb0f727c162caf5f (patch)
tree16c0df44bc2e96b3a1a29a4e774f17c503e1820e /usr.bin/mandoc/mdoc_man.c
parentBlock closing macros do not allocate a new node but finish an existing (diff)
downloadwireguard-openbsd-fe69a9a4bf7bd3da0ea0918bbb0f727c162caf5f.tar.xz
wireguard-openbsd-fe69a9a4bf7bd3da0ea0918bbb0f727c162caf5f.zip
Use normal line macro recognition, do not attempt to roll your own.
This fixes horizontal spacing when an Ns macro follows a block-closing macro and the corresponding block-opening macro is not on the same line.
Diffstat (limited to 'usr.bin/mandoc/mdoc_man.c')
-rw-r--r--usr.bin/mandoc/mdoc_man.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/mandoc/mdoc_man.c b/usr.bin/mandoc/mdoc_man.c
index 5dde45804bd..b21b2ead296 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.50 2013/06/02 18:16:51 schwarze Exp $ */
+/* $Id: mdoc_man.c,v 1.51 2013/09/15 18:48:26 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -549,7 +549,7 @@ man_mdoc(void *arg, const struct mdoc *mdoc)
static void
print_node(DECL_ARGS)
{
- const struct mdoc_node *prev, *sub;
+ const struct mdoc_node *sub;
const struct manact *act;
int cond, do_sub;
@@ -557,8 +557,7 @@ print_node(DECL_ARGS)
* Break the line if we were parsed subsequent the current node.
* This makes the page structure be more consistent.
*/
- prev = n->prev ? n->prev : n->parent;
- if (MMAN_spc & outflags && prev && prev->line < n->line)
+ if (MMAN_spc & outflags && MDOC_LINE & n->flags)
outflags |= MMAN_nl;
act = NULL;