From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (kristaps@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id p6CLWivS023286 for ; Tue, 12 Jul 2011 17:32:45 -0400 (EDT) Received: (from kristaps@localhost) by krisdoz.my.domain (8.14.3/8.14.3/Submit) id p6CLWi6v009341; Tue, 12 Jul 2011 17:32:44 -0400 (EDT) Date: Tue, 12 Jul 2011 17:32:44 -0400 (EDT) Message-Id: <201107122132.p6CLWi6v009341@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: kristaps@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Have equation be allocated with mparse. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 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