aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2021-06-28 19:50:15 +0000
committerIngo Schwarze <schwarze@openbsd.org>2021-06-28 19:50:15 +0000
commit12cdf199b702bf67a3c09dafc5c99f09b73e5492 (patch)
treec3115ec17643d8c99364ee9bef2ffec3e00c373f
parentbe51c141f11b2f1550c1b8bbd47639509679ecd3 (diff)
downloadmandoc-12cdf199b702bf67a3c09dafc5c99f09b73e5492.tar.gz
mandoc-12cdf199b702bf67a3c09dafc5c99f09b73e5492.tar.zst
mandoc-12cdf199b702bf67a3c09dafc5c99f09b73e5492.zip
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).
-rw-r--r--man_term.c10
-rw-r--r--mandoc.16
2 files changed, 4 insertions, 12 deletions
diff --git a/man_term.c b/man_term.c
index b71d6bee..d289f2d1 100644
--- a/man_term.c
+++ b/man_term.c
@@ -1,4 +1,4 @@
-/* $Id: man_term.c,v 1.235 2020/03/13 15:32:28 schwarze Exp $ */
+/* $Id: man_term.c,v 1.236 2021/06/28 19:50:15 schwarze Exp $ */
/*
* Copyright (c) 2010-2015, 2017-2020 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
@@ -1021,10 +1021,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) {
@@ -1143,9 +1139,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/mandoc.1 b/mandoc.1
index 1fe95806..00e7eec3 100644
--- a/mandoc.1
+++ b/mandoc.1
@@ -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