summaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-06-16 19:45:51 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-06-16 19:45:51 +0000
commita7f2dc1d0e14e61727a4abdb0250b39e016e0705 (patch)
treecdb31d5b93768b5cf7b00e8d9cc1e64704f87814 /mdoc_term.c
parent632038c8c98f1c408bb368edf910b849f186dc8a (diff)
downloadmandoc-a7f2dc1d0e14e61727a4abdb0250b39e016e0705.tar.gz
mandoc-a7f2dc1d0e14e61727a4abdb0250b39e016e0705.tar.zst
mandoc-a7f2dc1d0e14e61727a4abdb0250b39e016e0705.zip
Removed MDOC___: moved MDOC_Ap to its index (comments not passed into mdoc parser).
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c12
1 files changed, 7 insertions, 5 deletions
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 <kristaps@kth.se>
*
@@ -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);
}