summaryrefslogtreecommitdiffstats
path: root/man_term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-05-10 08:27:09 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-05-10 08:27:09 +0000
commitf7239192d5929cd8f1da21cd05d1faab2880f559 (patch)
tree99c9f17a67383437b05731d1a9e6038289fc4817 /man_term.c
parentbed4998695cb74458a9807c5d4904d4cafe6df51 (diff)
downloadmandoc-f7239192d5929cd8f1da21cd05d1faab2880f559.tar.gz
Proper leading spaces for new- and old-groff in -man -Tascii mode.
Diffstat (limited to 'man_term.c')
-rw-r--r--man_term.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/man_term.c b/man_term.c
index 65d46f75..f0f5625e 100644
--- a/man_term.c
+++ b/man_term.c
@@ -369,7 +369,7 @@ pre_sp(DECL_ARGS)
if (0 == len)
term_newln(p);
- for (i = 0; i < len; i++)
+ for (i = 0; i <= len; i++)
term_vspace(p);
return(0);
@@ -710,6 +710,9 @@ pre_SH(DECL_ARGS)
if (n->prev && MAN_SH == n->prev->tok)
if (NULL == n->prev->body->child)
break;
+ /* If the first macro, no vspae. */
+ if (NULL == n->prev)
+ break;
term_vspace(p);
break;
case (MAN_HEAD):
@@ -892,6 +895,12 @@ print_man_head(struct termp *p, const struct man_meta *m)
p->rmargin = p->maxrmargin;
+#ifdef __OpenBSD__
+ term_vspace(p);
+ term_vspace(p);
+ term_vspace(p);
+#endif
+
p->offset = 0;
buf[0] = title[0] = '\0';
@@ -931,4 +940,13 @@ print_man_head(struct termp *p, const struct man_meta *m)
p->rmargin = p->maxrmargin;
p->offset = 0;
p->flags &= ~TERMP_NOSPACE;
+
+#ifdef __OpenBSD__
+ term_vspace(p);
+ term_vspace(p);
+#else
+ term_vspace(p);
+ term_vspace(p);
+ term_vspace(p);
+#endif
}