From 8b443f186e2557df92e04f3b82a2ce9d2011cb7e Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 19 Apr 2015 13:50:25 +0000 Subject: Unify node handling functions: * node_alloc() for mdoc and man_node_alloc() -> roff_node_alloc() * node_append() for mdoc and man_node_append() -> roff_node_append() * mdoc_head_alloc() and man_head_alloc() -> roff_head_alloc() * mdoc_body_alloc() and man_body_alloc() -> roff_body_alloc() * mdoc_node_unlink() and man_node_unlink() -> roff_node_unlink() * mdoc_node_free() and man_node_free() -> roff_node_free() * mdoc_node_delete() and man_node_delete() -> roff_node_delete() Minus 130 lines of code, no functional change. --- man_validate.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'man_validate.c') diff --git a/man_validate.c b/man_validate.c index ef45ce21..e1303f38 100644 --- a/man_validate.c +++ b/man_validate.c @@ -33,6 +33,7 @@ #include "roff.h" #include "man.h" #include "libmandoc.h" +#include "roff_int.h" #include "libman.h" #define CHKARGS struct roff_man *man, struct roff_node *n @@ -256,7 +257,7 @@ check_par(CHKARGS) switch (n->type) { case ROFFT_BLOCK: if (0 == n->body->nchild) - man_node_delete(man, n); + roff_node_delete(man, n); break; case ROFFT_BODY: if (0 == n->nchild) @@ -284,7 +285,7 @@ post_IP(CHKARGS) switch (n->type) { case ROFFT_BLOCK: if (0 == n->head->nchild && 0 == n->body->nchild) - man_node_delete(man, n); + roff_node_delete(man, n); break; case ROFFT_BODY: if (0 == n->parent->head->nchild && 0 == n->nchild) @@ -388,7 +389,7 @@ post_TH(CHKARGS) * Remove the `TH' node after we've processed it for our * meta-data. */ - man_node_delete(man, man->last); + roff_node_delete(man, man->last); } static void @@ -509,7 +510,7 @@ post_vs(CHKARGS) * Don't warn about this because it occurs in pod2man * and would cause considerable (unfixable) warnage. */ - man_node_delete(man, n); + roff_node_delete(man, n); break; default: break; -- cgit v1.2.3-56-ge451