aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-12-31 04:55:46 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-12-31 04:55:46 +0000
commit04c844c9b370f59b5c07157eec6ba5a879b30218 (patch)
tree77c904bb370cdab856881030834ae9e529643308 /man.c
parent68183e3516ca405d803db497157cd8246b9b8bad (diff)
downloadmandoc-04c844c9b370f59b5c07157eec6ba5a879b30218.tar.gz
mandoc-04c844c9b370f59b5c07157eec6ba5a879b30218.tar.zst
mandoc-04c844c9b370f59b5c07157eec6ba5a879b30218.zip
Cleanup, minus 15 LOC, no functional change:
Simplify the way the man(7) and mdoc(7) validators are called. Reset the parser state with a common function before calling them. There is no need to again reset the parser state afterwards, the parsers are no longer used after validation. This allows getting rid of man_node_validate() and mdoc_node_validate() as separate functions.
Diffstat (limited to 'man.c')
-rw-r--r--man.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/man.c b/man.c
index 2a198dd9..8eb8e757 100644
--- a/man.c
+++ b/man.c
@@ -1,4 +1,4 @@
-/* $Id: man.c,v 1.182 2018/12/30 00:49:55 schwarze Exp $ */
+/* $Id: man.c,v 1.183 2018/12/31 04:55:46 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013,2014,2015,2017,2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -367,12 +367,3 @@ man_state(struct roff_man *man, struct roff_node *n)
}
man->last->flags |= NODE_VALID;
}
-
-void
-man_validate(struct roff_man *man)
-{
-
- man->last = man->meta.first;
- man_node_validate(man);
- man->flags &= ~MAN_LITERAL;
-}