summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/man.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2018-12-31 04:55:43 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2018-12-31 04:55:43 +0000
commit9dc0cbc9432027eab2d3c04c14013690b258818c (patch)
tree4c751989e920d43325566c37f6a4292d7ecd0f26 /usr.bin/mandoc/man.c
parent9eca19b985d2c8f9ff720551709ddebb3287cfba (diff)
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 'usr.bin/mandoc/man.c')
-rw-r--r--usr.bin/mandoc/man.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/usr.bin/mandoc/man.c b/usr.bin/mandoc/man.c
index 6bed70b9ea3..d04f816fd97 100644
--- a/usr.bin/mandoc/man.c
+++ b/usr.bin/mandoc/man.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: man.c,v 1.130 2018/12/30 00:48:47 schwarze Exp $ */
+/* $OpenBSD: man.c,v 1.131 2018/12/31 04:55:42 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>
@@ -365,12 +365,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;
-}