aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit8b443f186e2557df92e04f3b82a2ce9d2011cb7e (patch)
tree5a8f490b14623ef0fa1b59748985a18a717ebdaf /man_validate.c
parent28e0682df89260767e1ad5a3af0b93e504ae5290 (diff)
downloadmandoc-8b443f186e2557df92e04f3b82a2ce9d2011cb7e.tar.gz
mandoc-8b443f186e2557df92e04f3b82a2ce9d2011cb7e.tar.zst
mandoc-8b443f186e2557df92e04f3b82a2ce9d2011cb7e.zip
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;