=================================================================== RCS file: /cvs/mandoc/tree.c,v retrieving revision 1.12 retrieving revision 1.15 diff -u -p -r1.12 -r1.15 --- mandoc/tree.c 2009/04/12 19:45:26 1.12 +++ mandoc/tree.c 2009/09/16 09:41:24 1.15 @@ -1,6 +1,6 @@ -/* $Id: tree.c,v 1.12 2009/04/12 19:45:26 kristaps Exp $ */ +/* $Id: tree.c,v 1.15 2009/09/16 09:41:24 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 @@ -27,22 +27,20 @@ static void print_man(const struct man_node *, int); /* ARGSUSED */ -int +void tree_mdoc(void *arg, const struct mdoc *mdoc) { print_mdoc(mdoc_node(mdoc), 0); - return(1); } /* ARGSUSED */ -int +void tree_man(void *arg, const struct man *man) { print_man(man_node(man), 0); - return(1); } @@ -163,6 +161,15 @@ print_man(const struct man_node *n, int indent) case (MAN_TEXT): t = "text"; break; + case (MAN_BLOCK): + t = "block"; + break; + case (MAN_HEAD): + t = "block-head"; + break; + case (MAN_BODY): + t = "block-body"; + break; default: abort(); /* NOTREACHED */ @@ -173,6 +180,12 @@ print_man(const struct man_node *n, int indent) p = n->string; break; case (MAN_ELEM): + /* FALLTHROUGH */ + case (MAN_BLOCK): + /* FALLTHROUGH */ + case (MAN_HEAD): + /* FALLTHROUGH */ + case (MAN_BODY): p = man_macronames[n->tok]; break; case (MAN_ROOT):