diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-04-19 13:50:11 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-04-19 13:50:11 +0000 |
commit | 0badf0b9c18d345c4cf92a460d5f62f6e300a8b1 (patch) | |
tree | f8dcec23d1b5964d83163cff801ba71d61d9233c /usr.bin/mandoc/man_validate.c | |
parent | 3bb597daa5c36e58b3fb92cc6c2dbad08cb1f268 (diff) |
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 'usr.bin/mandoc/man_validate.c')
-rw-r--r-- | usr.bin/mandoc/man_validate.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/mandoc/man_validate.c b/usr.bin/mandoc/man_validate.c index e34c670b5d0..c5c76b36604 100644 --- a/usr.bin/mandoc/man_validate.c +++ b/usr.bin/mandoc/man_validate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: man_validate.c,v 1.88 2015/04/18 16:04:40 schwarze Exp $ */ +/* $OpenBSD: man_validate.c,v 1.89 2015/04/19 13:50:10 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2012-2015 Ingo Schwarze <schwarze@openbsd.org> @@ -31,6 +31,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 @@ -254,7 +255,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) @@ -282,7 +283,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) @@ -386,7 +387,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 @@ -507,7 +508,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; |