From a7f2dc1d0e14e61727a4abdb0250b39e016e0705 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Tue, 16 Jun 2009 19:45:51 +0000 Subject: Removed MDOC___: moved MDOC_Ap to its index (comments not passed into mdoc parser). --- mdoc_term.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'mdoc_term.c') diff --git a/mdoc_term.c b/mdoc_term.c index 7cf400f9..5f12c5d6 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.13 2009/06/15 20:26:47 kristaps Exp $ */ +/* $Id: mdoc_term.c,v 1.14 2009/06/16 19:45:51 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -183,7 +183,7 @@ struct termact { }; static const struct termact termacts[MDOC_MAX] = { - { NULL, NULL }, /* \" */ + { termp_ap_pre, NULL }, /* Ap */ { NULL, NULL }, /* Dd */ { NULL, NULL }, /* Dt */ { NULL, NULL }, /* Os */ @@ -290,8 +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_ap_pre, NULL }, /* 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 */ @@ -336,7 +335,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); } -- cgit v1.2.3-56-ge451