summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/man_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2011-09-20 09:02:19 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2011-09-20 09:02:19 +0000
commitd2d2bbc78704c441b2671fd83f2b9a164ddee7e4 (patch)
treefde3aaa4586314c9bb6b016fff5cad4236b25e2f /usr.bin/mandoc/man_term.c
parentaf9b876bf99e9a5f23c55670ef0788f8c44df303 (diff)
Sync print_mdoc_head to print_man_head;
this was forgotten after man_term.c rev. 1.25 on March 2, 2010. The benefit is a sane page header line when .Dt is very long. Reminded by Thomas Klausner <wiz at NetBSD>, thanks.
Diffstat (limited to 'usr.bin/mandoc/man_term.c')
-rw-r--r--usr.bin/mandoc/man_term.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/mandoc/man_term.c b/usr.bin/mandoc/man_term.c
index f6649d314d8..1e63899fa17 100644
--- a/usr.bin/mandoc/man_term.c
+++ b/usr.bin/mandoc/man_term.c
@@ -1,4 +1,4 @@
-/* $Id: man_term.c,v 1.72 2011/09/19 22:36:11 schwarze Exp $ */
+/* $Id: man_term.c,v 1.73 2011/09/20 09:02:18 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -1003,9 +1003,9 @@ print_man_head(struct termp *p, const void *arg)
* point we did so here.
*/
+ p->offset = 0;
p->rmargin = p->maxrmargin;
- p->offset = 0;
buf[0] = title[0] = '\0';
if (m->vol)
@@ -1015,12 +1015,12 @@ print_man_head(struct termp *p, const void *arg)
snprintf(title, BUFSIZ, "%s(%s)", m->title, m->msec);
titlen = term_strlen(p, title);
+ p->flags |= TERMP_NOBREAK | TERMP_NOSPACE;
p->offset = 0;
p->rmargin = 2 * (titlen+1) + buflen < p->maxrmargin ?
(p->maxrmargin -
term_strlen(p, buf) + term_len(p, 1)) / 2 :
p->maxrmargin - buflen;
- p->flags |= TERMP_NOBREAK | TERMP_NOSPACE;
term_word(p, title);
term_flushln(p);
@@ -1042,9 +1042,9 @@ print_man_head(struct termp *p, const void *arg)
term_flushln(p);
}
- p->rmargin = p->maxrmargin;
- p->offset = 0;
p->flags &= ~TERMP_NOSPACE;
+ p->offset = 0;
+ p->rmargin = p->maxrmargin;
/*
* Groff likes to have some leading spaces before content. Well