summaryrefslogtreecommitdiffstats
path: root/man_validate.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-04-19 13:50:25 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-04-19 13:50:25 +0000
commit344327def21ee64357a9cdf57c5352f1c5575708 (patch)
tree9c1fa971d139df98f2c3890c5d8712eaf4436b86 /man_validate.c
parentd4d5d006d52687c2882e89b913c70967626da0e1 (diff)
downloadmandoc-344327def21ee64357a9cdf57c5352f1c5575708.tar.gz
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.
Diffstat (limited to 'man_validate.c')
-rw-r--r--man_validate.c9
1 files changed, 5 insertions, 4 deletions
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;