* mdocml: Have equation be allocated with mparse.
@ 2011-07-12 21:32 kristaps
0 siblings, 0 replies; only message in thread
From: kristaps @ 2011-07-12 21:32 UTC (permalink / raw)
To: source
Log Message:
-----------
Have equation be allocated with mparse. Will be needed for logging of
messages.
Modified Files:
--------------
mdocml:
eqn.c
libroff.h
roff.c
Revision Data
-------------
Index: eqn.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/eqn.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -Leqn.c -Leqn.c -u -p -r1.4 -r1.5
--- eqn.c
+++ eqn.c
@@ -53,11 +53,13 @@ eqn_read(struct eqn_node **epp, int ln,
}
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;
Index: roff.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/roff.c,v
retrieving revision 1.144
retrieving revision 1.145
diff -Lroff.c -Lroff.c -u -p -r1.144 -r1.145
--- roff.c
+++ 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;
Index: libroff.h
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/libroff.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -Llibroff.h -Llibroff.h -u -p -r1.20 -r1.21
--- libroff.h
+++ 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, c
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);
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-07-12 21:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-12 21:32 mdocml: Have equation be allocated with mparse kristaps
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).