summaryrefslogtreecommitdiffstats
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
commita2605b913e645cce238389093dfa9d10cbcf7236 (patch)
tree3317fca3abd0842e344f10313bf2813aa59958b7 /mdoc_term.c
parentbf5cc7adff53d67064937f93d51005e425746df8 (diff)
downloadmandoc-a2605b913e645cce238389093dfa9d10cbcf7236.tar.gz
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.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 35ec24e7..cf6a8b50 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -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);
}