diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2018-12-30 00:49:54 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2018-12-30 00:49:54 +0000 |
commit | 68183e3516ca405d803db497157cd8246b9b8bad (patch) | |
tree | d88411ec1f7435c594c8afcfc4b99cca3a0d5bdf /libmdoc.h | |
parent | b4f47224dd1036f4d89f641195a444eea00a55e8 (diff) | |
download | mandoc-68183e3516ca405d803db497157cd8246b9b8bad.tar.gz mandoc-68183e3516ca405d803db497157cd8246b9b8bad.tar.zst mandoc-68183e3516ca405d803db497157cd8246b9b8bad.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 'libmdoc.h')
-rw-r--r-- | libmdoc.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: libmdoc.h,v 1.115 2018/12/21 17:15:18 schwarze Exp $ */ +/* $Id: libmdoc.h,v 1.116 2018/12/30 00:49:54 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> @@ -16,6 +16,10 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +struct roff_node; +struct roff_man; +struct mdoc_arg; + #define MACRO_PROT_ARGS struct roff_man *mdoc, \ enum roff_tok tok, \ int line, \ |