From 192c9c5233e75a3a5f0a458942b8cfa22e26950f Mon Sep 17 00:00:00 2001 From: schwarze Date: Mon, 28 Jun 2021 19:49:57 +0000 Subject: [PATCH] In terminal output of man(7) documents, stop printing two extra blank lines before the NAME section and before the page footer. While these blank lines had a long tradition, they didn't really serve any purpose and merely wasted screen real estate. Besides, this makes output from man(7) more similar to output from mdoc(7). This commit keeps mandoc compatible with groff-current, where G. Branden Robinson committed the same change on June 16 (groff commit 2278d6ed). --- usr.bin/mandoc/man_term.c | 10 +--------- usr.bin/mandoc/mandoc.1 | 8 ++++---- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/usr.bin/mandoc/man_term.c b/usr.bin/mandoc/man_term.c index 3bf25adbf54..375555025e0 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.188 2020/03/13 00:31:05 schwarze Exp $ */ +/* $OpenBSD: man_term.c,v 1.189 2021/06/28 19:49:57 schwarze Exp $ */ /* * Copyright (c) 2010-2015, 2017-2020 Ingo Schwarze * Copyright (c) 2008-2012 Kristaps Dzonsons @@ -1019,10 +1019,6 @@ print_man_foot(struct termp *p, const struct roff_meta *meta) */ if ( ! p->mdocstyle) { - if (meta->hasbody) { - term_vspace(p); - term_vspace(p); - } mandoc_asprintf(&title, "%s(%s)", meta->title, meta->msec); } else if (meta->os != NULL) { @@ -1141,9 +1137,5 @@ print_man_head(struct termp *p, const struct roff_meta *meta) */ term_vspace(p); - if ( ! p->mdocstyle) { - term_vspace(p); - term_vspace(p); - } free(title); } diff --git a/usr.bin/mandoc/mandoc.1 b/usr.bin/mandoc/mandoc.1 index cfa47b4b81a..519b065648d 100644 --- a/usr.bin/mandoc/mandoc.1 +++ b/usr.bin/mandoc/mandoc.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: mandoc.1,v 1.176 2021/06/27 17:57:13 schwarze Exp $ +.\" $OpenBSD: mandoc.1,v 1.177 2021/06/28 19:49:57 schwarze Exp $ .\" .\" Copyright (c) 2012, 2014-2021 Ingo Schwarze .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: June 27 2021 $ +.Dd $Mdocdate: June 28 2021 $ .Dt MANDOC 1 .Os .Sh NAME @@ -301,8 +301,8 @@ Format input files in .Xr mdoc 7 output style. -Specifically, this suppresses the two additional blank lines near the -top and the bottom of each page, and it implies +This prints the operating system name rather than the page title +on the right side of the footer line, and it implies .Fl O Cm indent Ns =5 . One useful application is for checking that .Fl T Cm man -- 2.20.1