diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2008-12-05 17:43:14 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2008-12-05 17:43:14 +0000 |
commit | 57ed1544ce7edde6d0812e0c870f03e6b1e7204f (patch) | |
tree | f0901e95a0cbbd7383ebde2739459cdba0e7c8da /mlg.c | |
parent | a4880c4fea2cc33d9168cb96bc44c1b3670ef402 (diff) | |
download | mandoc-57ed1544ce7edde6d0812e0c870f03e6b1e7204f.tar.gz |
*** empty log message ***
Diffstat (limited to 'mlg.c')
-rw-r--r-- | mlg.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -58,6 +58,7 @@ struct md_mlg { int flags; #define ML_OVERRIDE_ONE (1 << 0) #define ML_OVERRIDE_ALL (1 << 1) + void *data; }; @@ -144,7 +145,7 @@ mlg_begintag(struct md_mlg *p, enum md_ns ns, int tok, if ( ! ml_nputs(p->mbuf, "<", 1, &p->pos)) return(0); - res = (*p->begintag)(p->mbuf, p->args, ns, tok, + res = (*p->begintag)(p->mbuf, p->data, p->args, ns, tok, argc, (const char **)argv); if (-1 == res) return(0); @@ -193,7 +194,7 @@ mlg_endtag(struct md_mlg *p, enum md_ns ns, int tok) if ( ! ml_nputs(p->mbuf, "</", 2, &p->pos)) return(0); - res = (*p->endtag)(p->mbuf, p->args, ns, tok); + res = (*p->endtag)(p->mbuf, p->data, p->args, ns, tok); if (-1 == res) return(0); @@ -333,7 +334,7 @@ mlg_exit(struct md_mlg *p, int flush) struct md_mlg * -mlg_alloc(const struct md_args *args, +mlg_alloc(const struct md_args *args, void *data, const struct md_rbuf *rbuf, struct md_mbuf *mbuf, ml_begintag begintag, ml_endtag endtag, @@ -366,6 +367,7 @@ mlg_alloc(const struct md_args *args, p->endtag = endtag; p->begin = begin; p->end = end; + p->data = data; if (NULL == (p->tree = roff_alloc(&cb, p))) { free(p); |