X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/6cbefd50d90dc947c06ea2212c4d3552c4a36c84..ce544e49846f76fd73e8414d407d555f2a0af880:/tree.c?ds=sidebyside diff --git a/tree.c b/tree.c index d0aee4ab..6c0ff01c 100644 --- a/tree.c +++ b/tree.c @@ -1,6 +1,6 @@ -/* $Id: tree.c,v 1.15 2009/09/16 09:41:24 kristaps Exp $ */ +/* $Id: tree.c,v 1.24 2010/07/07 15:04:54 kristaps Exp $ */ /* - * Copyright (c) 2008, 2009 Kristaps Dzonsons + * Copyright (c) 2008, 2009 Kristaps Dzonsons * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -14,13 +14,19 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include -#include #include #include +#include +#include "mandoc.h" #include "mdoc.h" #include "man.h" +#include "main.h" static void print_mdoc(const struct mdoc_node *, int); static void print_man(const struct man_node *, int); @@ -68,7 +74,10 @@ print_mdoc(const struct mdoc_node *n, int indent) t = "block-head"; break; case (MDOC_BODY): - t = "block-body"; + if (n->end) + t = "body-end"; + else + t = "block-body"; break; case (MDOC_TAIL): t = "block-tail";