aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/main.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-12-30 00:49:54 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-12-30 00:49:54 +0000
commit68183e3516ca405d803db497157cd8246b9b8bad (patch)
treed88411ec1f7435c594c8afcfc4b99cca3a0d5bdf /main.h
parentb4f47224dd1036f4d89f641195a444eea00a55e8 (diff)
downloadmandoc-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 'main.h')
-rw-r--r--main.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/main.h b/main.h
index c3e09be6..772ea648 100644
--- a/main.h
+++ b/main.h
@@ -1,4 +1,4 @@
-/* $Id: main.h,v 1.28 2018/08/23 19:33:27 schwarze Exp $ */
+/* $Id: main.h,v 1.29 2018/12/30 00:49:55 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -16,7 +16,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-struct roff_man;
+struct roff_meta;
struct manoutput;
/*
@@ -27,14 +27,14 @@ struct manoutput;
*/
void *html_alloc(const struct manoutput *);
-void html_mdoc(void *, const struct roff_man *);
-void html_man(void *, const struct roff_man *);
+void html_mdoc(void *, const struct roff_meta *);
+void html_man(void *, const struct roff_meta *);
void html_free(void *);
-void tree_mdoc(void *, const struct roff_man *);
-void tree_man(void *, const struct roff_man *);
+void tree_mdoc(void *, const struct roff_meta *);
+void tree_man(void *, const struct roff_meta *);
-void man_mdoc(void *, const struct roff_man *);
+void man_mdoc(void *, const struct roff_meta *);
void *locale_alloc(const struct manoutput *);
void *utf8_alloc(const struct manoutput *);
@@ -45,8 +45,8 @@ void *pdf_alloc(const struct manoutput *);
void *ps_alloc(const struct manoutput *);
void pspdf_free(void *);
-void terminal_mdoc(void *, const struct roff_man *);
-void terminal_man(void *, const struct roff_man *);
+void terminal_mdoc(void *, const struct roff_meta *);
+void terminal_man(void *, const struct roff_meta *);
void terminal_sepline(void *);
-void markdown_mdoc(void *, const struct roff_man *);
+void markdown_mdoc(void *, const struct roff_meta *);