From 41e81f9fc56dbe499ec91216e92df0095d1e5eb5 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 14 Jul 2012 10:47:07 +0000 Subject: Translate blank input lines to .sp just like in mdoc(7), and ignore .sp after .PP. This fixes vertical spacing for blank lines after .PP and for .sp after .PP. OpenBSD rev. man.c 1.68 and man_term.c 1.86 --- man_term.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'man_term.c') diff --git a/man_term.c b/man_term.c index 14e13246..93f927d9 100644 --- a/man_term.c +++ b/man_term.c @@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.131 2012/07/13 14:19:49 schwarze Exp $ */ +/* $Id: man_term.c,v 1.132 2012/07/14 10:47:07 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010, 2011, 2012 Ingo Schwarze @@ -445,10 +445,21 @@ pre_sp(DECL_ARGS) int neg; if ((NULL == n->prev && n->parent)) { - if (MAN_SS == n->parent->tok) - return(0); - if (MAN_SH == n->parent->tok) + switch (n->parent->tok) { + case (MAN_SH): + /* FALLTHROUGH */ + case (MAN_SS): + /* FALLTHROUGH */ + case (MAN_PP): + /* FALLTHROUGH */ + case (MAN_LP): + /* FALLTHROUGH */ + case (MAN_P): + /* FALLTHROUGH */ return(0); + default: + break; + } } neg = 0; -- cgit v1.2.3