summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/man.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2018-12-30 00:48:47 +0000
committerschwarze <schwarze@openbsd.org>2018-12-30 00:48:47 +0000
commit6b86842e6cdb3960f6b08bd377e1a60a2f8ba124 (patch)
tree50673084d24eb85a3039a769d815803000c6565f /usr.bin/mandoc/man.c
parentCleanup: Initialize the pointers to position data early, and use (diff)
downloadwireguard-openbsd-6b86842e6cdb3960f6b08bd377e1a60a2f8ba124.tar.xz
wireguard-openbsd-6b86842e6cdb3960f6b08bd377e1a60a2f8ba124.zip
Cleanup, no functional change:
The struct roff_man used to be a bad mixture of internal parser state and public parsing results. Move the public results to the parsing result struct roff_meta, which is already public. Move the rest of struct roff_man to the parser-internal header roff_int.h. Since the validators need access to the parser state, call them from the top level parser during mparse_result() rather than from the main programs, also reducing code duplication. This keeps parser internal state out of thee main programs (five in mandoc portable) and out of eight formatters.
Diffstat (limited to 'usr.bin/mandoc/man.c')
-rw-r--r--usr.bin/mandoc/man.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mandoc/man.c b/usr.bin/mandoc/man.c
index 62762f6605d..6bed70b9ea3 100644
--- a/usr.bin/mandoc/man.c
+++ b/usr.bin/mandoc/man.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: man.c,v 1.129 2018/12/14 05:17:45 schwarze Exp $ */
+/* $OpenBSD: man.c,v 1.130 2018/12/30 00:48:47 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>
@@ -370,7 +370,7 @@ void
man_validate(struct roff_man *man)
{
- man->last = man->first;
+ man->last = man->meta.first;
man_node_validate(man);
man->flags &= ~MAN_LITERAL;
}