summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/mandoc/man_term.c7
-rw-r--r--usr.bin/mandoc/mdoc_term.c9
2 files changed, 11 insertions, 5 deletions
diff --git a/usr.bin/mandoc/man_term.c b/usr.bin/mandoc/man_term.c
index 4aede7a7120..20fa0c9531f 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.6 2009/06/18 23:34:53 schwarze Exp $ */
+/* $Id: man_term.c,v 1.7 2009/06/21 20:49:33 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -91,7 +91,10 @@ man_run(struct termp *p, const struct man *m)
print_head(p, man_meta(m));
p->flags |= TERMP_NOSPACE;
- print_body(p, man_node(m), man_meta(m));
+ assert(man_node(m));
+ assert(MAN_ROOT == man_node(m)->type);
+ if (man_node(m)->child)
+ print_body(p, man_node(m)->child, man_meta(m));
print_foot(p, man_meta(m));
return(1);
diff --git a/usr.bin/mandoc/mdoc_term.c b/usr.bin/mandoc/mdoc_term.c
index c31e601fa56..45624869113 100644
--- a/usr.bin/mandoc/mdoc_term.c
+++ b/usr.bin/mandoc/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.12 2009/06/21 19:53:47 schwarze Exp $ */
+/* $Id: mdoc_term.c,v 1.13 2009/06/21 20:49:33 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -290,7 +290,7 @@ static const struct termact termacts[MDOC_MAX] = {
{ NULL, NULL }, /* Fr */
{ termp_ud_pre, NULL }, /* Ud */
{ termp_lb_pre, termp_lb_post }, /* Lb */
- { termp_pp_pre, NULL }, /* Pp */
+ { termp_pp_pre, NULL }, /* Lp */
{ termp_lk_pre, NULL }, /* Lk */
{ termp_mt_pre, NULL }, /* Mt */
{ termp_brq_pre, termp_brq_post }, /* Brq */
@@ -330,7 +330,10 @@ mdoc_run(struct termp *p, const struct mdoc *m)
*/
print_head(p, mdoc_meta(m));
- print_body(p, NULL, mdoc_meta(m), mdoc_node(m));
+ assert(mdoc_node(m));
+ assert(MDOC_ROOT == mdoc_node(m)->type);
+ if (mdoc_node(m)->child)
+ print_body(p, NULL, mdoc_meta(m), mdoc_node(m)->child);
print_foot(p, mdoc_meta(m));
return(1);
}