source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: kristaps@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Have equation be allocated with mparse.
Date: Tue, 12 Jul 2011 17:32:44 -0400 (EDT)	[thread overview]
Message-ID: <201107122132.p6CLWi6v009341@krisdoz.my.domain> (raw)

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

                 reply	other threads:[~2011-07-12 21:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201107122132.p6CLWi6v009341@krisdoz.my.domain \
    --to=kristaps@mdocml.bsd.lv \
    --cc=source@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).