summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--eqn.c4
-rw-r--r--libroff.h3
-rw-r--r--roff.c2
3 files changed, 6 insertions, 3 deletions
diff --git a/eqn.c b/eqn.c
index 897b45e9..2df45969 100644
--- a/eqn.c
+++ b/eqn.c
@@ -53,11 +53,13 @@ eqn_read(struct eqn_node **epp, int ln, const char *p, int offs)
}
struct eqn_node *
-eqn_alloc(int pos, int line)
+eqn_alloc(int pos, int line, struct mparse *parse)
{
struct eqn_node *p;
p = mandoc_calloc(1, sizeof(struct eqn_node));
+ p->parse = parse;
+
p->eqn.line = line;
p->eqn.pos = pos;
diff --git a/libroff.h b/libroff.h
index d3af0fde..b0e36385 100644
--- a/libroff.h
+++ b/libroff.h
@@ -45,6 +45,7 @@ struct tbl_node {
struct eqn_node {
struct eqn eqn;
struct eqn_node *next;
+ struct mparse *parse;
};
struct tbl_node *tbl_alloc(int, int, struct mparse *);
@@ -58,7 +59,7 @@ int tbl_data(struct tbl_node *, int, const char *);
int tbl_cdata(struct tbl_node *, int, const char *);
const struct tbl_span *tbl_span(struct tbl_node *);
void tbl_end(struct tbl_node *);
-struct eqn_node *eqn_alloc(int, int);
+struct eqn_node *eqn_alloc(int, int, struct mparse *);
void eqn_end(struct eqn_node *);
void eqn_free(struct eqn_node *);
enum rofferr eqn_read(struct eqn_node **, int, const char *, int);
diff --git a/roff.c b/roff.c
index 488751a6..2d931ca2 100644
--- a/roff.c
+++ b/roff.c
@@ -1179,7 +1179,7 @@ roff_EQ(ROFF_ARGS)
struct eqn_node *e;
assert(NULL == r->eqn);
- e = eqn_alloc(ppos, ln);
+ e = eqn_alloc(ppos, ln, r->parse);
if (r->last_eqn)
r->last_eqn->next = e;