aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/eqn_parse.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-12-14 06:33:14 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-12-14 06:33:14 +0000
commit4c2762423e7dcaf40f505c9000f23b6f18a484e5 (patch)
tree506be8e4f33431f64d95bfecad57d08f20be9dba /eqn_parse.h
parent7a6eb8920bdea2ecc151b308352b2a98699b2350 (diff)
downloadmandoc-4c2762423e7dcaf40f505c9000f23b6f18a484e5.tar.gz
mandoc-4c2762423e7dcaf40f505c9000f23b6f18a484e5.tar.zst
mandoc-4c2762423e7dcaf40f505c9000f23b6f18a484e5.zip
Cleanup, no functional change:
Now that message handling is properly encapsulated, remove struct mparse pointers from four structs (roff, roff_man, tbl_node, eqn_node) and from the argument lists of five functions (roff_alloc, roff_man_alloc, mandoc_getarg, tbl_alloc, eqn_alloc). Except for being passed to the main program as an opaque object, it now only occurs in read.c, as it should, and not across 15 files like in the past.
Diffstat (limited to 'eqn_parse.h')
-rw-r--r--eqn_parse.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/eqn_parse.h b/eqn_parse.h
index c0090119..a2a4e6fd 100644
--- a/eqn_parse.h
+++ b/eqn_parse.h
@@ -1,4 +1,4 @@
-/* $Id: eqn_parse.h,v 1.2 2018/12/13 05:23:38 schwarze Exp $ */
+/* $Id: eqn_parse.h,v 1.3 2018/12/14 06:33:14 schwarze Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -19,13 +19,11 @@
* For use in the roff(7) and eqn(7) parsers only.
*/
-struct mparse;
struct roff_node;
struct eqn_box;
struct eqn_def;
struct eqn_node {
- struct mparse *parse; /* Main parser, for error reporting. */
struct roff_node *node; /* Syntax tree of this equation. */
struct eqn_def *defs; /* Array of definitions. */
char *data; /* Source code of this equation. */
@@ -41,7 +39,7 @@ struct eqn_node {
};
-struct eqn_node *eqn_alloc(struct mparse *);
+struct eqn_node *eqn_alloc(void);
struct eqn_box *eqn_box_new(void);
void eqn_box_free(struct eqn_box *);
void eqn_free(struct eqn_node *);