summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/man_macro.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2018-12-30 00:48:49 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2018-12-30 00:48:49 +0000
commit6b33e0a95d108068486691c6796a071893276f5b (patch)
tree82df7ddc258a743a95c0fa6698c17708565e3884 /usr.bin/mandoc/man_macro.c
parenta8115538de1b74ab4231a9656e685f6edb7244fe (diff)
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_macro.c')
-rw-r--r--usr.bin/mandoc/man_macro.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mandoc/man_macro.c b/usr.bin/mandoc/man_macro.c
index 057303c9dce..4aa496cf201 100644
--- a/usr.bin/mandoc/man_macro.c
+++ b/usr.bin/mandoc/man_macro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: man_macro.c,v 1.99 2018/12/21 16:58:49 schwarze Exp $ */
+/* $OpenBSD: man_macro.c,v 1.100 2018/12/30 00:48:47 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2012-2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -444,7 +444,7 @@ void
man_endparse(struct roff_man *man)
{
- man_unscope(man, man->first);
+ man_unscope(man, man->meta.first);
man->flags &= ~MAN_LITERAL;
}